Spot by NetApp API (1.0)

Download OpenAPI specification:Download

Welcome to the Spot by NetApp OpenAPI Specification. Here you will find REST definitions for all Spot products and platform administration tasks.

The API is hosted at https://api.spotinst.io and requires Bearer Token Authentication.

For more information on how to use the Spot platform, including user guides, developer guides, concepts, and tutorials, see the external Spot Documentation.

Authentication

auth

To generate bearer tokens and understand more about Spot by NetApp authentication see the howto for token creation on the Spot Help site.

Organizations and Accounts

Each Spot account is assigned to an organization and a set of environment Accounts. An account is then linked to a specific cloud provider account.

Spot accounts are given an ID in the format act-123abcd that is sent as a query parameter while performing API calls.

To locate the account ID navigate to Settings -> Account in the Spot console.

Organizations with a Single Account

Each API call you make can be used with or without the account ID.

Organizations with Multiple Accounts

Each API call you make should be appended to the account ID. For example:

GET https://api.spotinst.io/aws/ec2/group?accountId=act-123de678 This call will return the list of Elastigroups for the specific Account used.

NOTE: If no accountId is provided, the default (dldest) account for the Organization will be used.

Security Scheme Type HTTP
HTTP Authorization Scheme bearer

Organizations

Get Users

Get all users in the organization, their details, and mapped accounts. Providing the optional account ID parameter will filter out all users not mapped to that account.

Authorizations:
query Parameters
accountId
any
Example: accountId=act-123abc

ID of the account you would like to get retrieve users from

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create User

Create a new user and link it to the creator's organization (the organization ID from the personal token attached to the API call). If the role is a viewer, the user is also linked to the default account for the organization.

Authorizations:
query Parameters
generateToken
any
Example: generateToken=true

If true, then the response will include personalAccessToken string

Request Body schema: application/json
email
string

Email

firstName
string

The first name of the user

lastName
string

The last name of the user

password
string

Password

role
string

User's role

Responses

Request samples

Content type
application/json
{
  • "firstName": "Test",
  • "lastName": "Test",
  • "email": "test@spot.io",
  • "password": "password1234",
  • "role": "viewer"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get User

Get user's account mapping

Authorizations:
query Parameters
userEmail
required
any
Example: userEmail=test@spot.io

Target user email address

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Organization

Delete a Spot Organization. ID of the organization can be obtained from your Spot console via the following link: https://console.spotinst.com/#/settings/organization/general > Note: This cannot be undone. Take caution.

Authorizations:
path Parameters
organizationId
required
any
Example: 606079812345

ID of the organization you would like to delete

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Programmatic User

This API creates a new programmatic user (not a human user). Use this API to provide privileges to an application that needs to interface with Spot. Spot returns a token that the programmatic user can use to perform actions with.

Authorizations:
Request Body schema: application/json
required
Array of objects

All the accounts the programmatic user will have access to. Cannot be empty.

description
string

Brief description of the user.

name
required
string

Name of the programmatic user.

Responses

Request samples

Content type
application/json
{
  • "description": "test programmatic",
  • "name": "testProgrammaticApi",
  • "accounts": [
    ]
}

Response samples

Content type
application/json
{
  • "response": {
    }
}

Get All Programmatic Users

Get all the Programmatic Users in the organization.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "response": {
    }
}

Update Programmatic User

Updates the Programmatic User.

Authorizations:
path Parameters
userId
required
string
Example: pu_968465

ID of the user

Request Body schema: application/json
Array of objects

All the accounts the programmatic user will have access to. Cannot be empty.

description
string

Brief description of the user.

Responses

Request samples

Content type
application/json
{
  • "description": "test programmatic",
  • "accounts": [
    ]
}

Response samples

Content type
application/json
{
  • "response": {
    }
}

Get Programmatic User

Gets the Programmatic User.

Authorizations:
path Parameters
userId
required
string
Example: pu_968465

ID of the user

Responses

Response samples

Content type
application/json
{
  • "response": {
    }
}

Delete Programmatic User

Deletes the Programmatic User.

Authorizations:
path Parameters
userId
required
string
Example: pu_968465

ID of the user

Responses

Response samples

Content type
application/json
{
  • "response": {
    }
}

Create Organization

Create a Spot Organization.

Authorizations:
Request Body schema: application/json
object

Organization

Responses

Request samples

Content type
application/json
{
  • "organization": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Accounts

Update Account

Update information in an account such as the account name and slack channel. To use this command, permissions for organization admin are required. Granular permissions will require access policies with the following actions: setup:updateAccount

Authorizations:
path Parameters
accountId
required
string
Example: act-123abc

ID of the account you would like to update

Request Body schema: application/json
required
object

Used for updating items in an account.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Account

Delete a Spot Account. The Spot Account ID can be obtained from your Spot console via the following link: https://console.spotinst.com/#/settings/account/general . Note This cannot be undone – take caution. Only Organization Admins can perform this action. In case you want to delete your default Spot account which is the account visible when you first log in please contact Support.

Authorizations:
path Parameters
accountId
required
any
Example: act-123456

ID of the account you would like to delete

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Users

Get all users in the organization, their details, and mapped accounts. Providing the optional account ID parameter will filter out all users not mapped to that account.

Authorizations:
query Parameters
accountId
any
Example: accountId=act-123abc

ID of the account you would like to get retrieve users from

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Assign Users to Accounts

Assign users to accounts in bulk. Only accounts under the creator's own organization are allowed. Creator's organization ID is taken from the personal token attached to the API call.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
One of
mappings
Array of any

Mappings objects include user, accountID and role.

Responses

Request samples

Content type
application/json
Example
{
  • "mappings": [
    ]
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update User Permissions

Change the users' permissions for an account (only accounts under the creator's own organization are allowed). Creator's organization ID is taken from the personal token attached to the API call.

Authorizations:
path Parameters
accountId
string
Example: act-123abc

ID of the account associated with your token

Request Body schema: application/json
One of
permissionStrategy
string
Default: "ROLE_BASED"

Set the user permissions type, by role or by access policy. Valid values "ROLE_BASED", "POLICY_BASED"

role
string

Valid values "viewer", "editor". Required on permissionStrategy = ROLE_BASED

userId
string

One of userEmail / userId is required. identify user by its user ID

Responses

Request samples

Content type
application/json
Example
{
  • "userId": "u-1234",
  • "permissionStrategy": "POLICY_BASED",
  • "role": "editor"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Detach User

Detach a user from an account (only accounts under the creator's own organization are allowed). Creator's organization ID is taken from the personal token attached to the API call.

Authorizations:
path Parameters
accountId
required
any
Example: act-123abc

Account ID

Request Body schema: application/json
userEmail
required
string

Email of the user that is going to be deleted

Responses

Request samples

Content type
application/json
{
  • "userEmail": "test@gmail.com"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Set Existing User Permissions

Add a user to the account and set its permissions on the account. Creator's organization ID is taken from the personal token attached to the API call.

Authorizations:
path Parameters
accountId
required
any
Example: act-123abc

Account ID

Request Body schema: application/json
One of
role
string

Valid values - "viewer", "editor". Required on permissionStrategy = ROLE_BASED

userEmail
string

One of userEmail / userId is required. identify user by its user ID

Responses

Request samples

Content type
application/json
Example
{
  • "userEmail": "test@spot.io",
  • "role": "viewer"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Account

Create a Spot account.

Authorizations:
Request Body schema: application/json
object

Account

Responses

Request samples

Content type
application/json
{
  • "account": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Accounts

Get a list of Spot accounts in your organization. When used without any parameters, the provided token must have Organization Admin permissions and the output will contain all the Organization's accounts. Note In case you want to list all the accounts associated with Organization you can use the below request URL without the cloudAccountId parameter, https://api.spotinst.io/setup/account

Authorizations:
query Parameters
cloudAccountId
string
Example: cloudAccountId=634245686616

Will list only the Spot accounts connected to the specified account ID.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Access Policy

Create an access policy. access policy enables you to define the user's permissions on a granular level than the role-based permissions.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object

Set access policy settings. Example - Acme, Inc.

Responses

Request samples

Content type
application/json
{
  • "policy": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Access Policies

Get access policy settings.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Users Permissions

Get the permissions for all the users in the account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Access Policy

Updates an access policy settings.

Authorizations:
path Parameters
policyId
required
any
Example: pol-2344nn

The access policy ID to delete

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object

Set access policy settings

Responses

Request samples

Content type
application/json
{
  • "policy": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Access Policy

Deletes an access policy settings.

Authorizations:
path Parameters
policyId
required
any
Example: pol-2344nn

The access policy ID to delete

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Set Credentials for AWS

Link a Spot account to an AWS Cloud account.
Please create external id using spot api (see /setup/credentials/aws/externalId)
and use it when creating the AWS role and then call this route with your AWS role's arn to link it to your spot account

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object

Credentials details

Responses

Request samples

Content type
application/json
{
  • "credentials": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create AWS account external id

Create aws account external id
You should use the external id when creating your AWS role for your spot account
and after you create the role you need to call set-aws-credentials Set Credentials for AWS
to link your AWS account with your spot account

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Set Credentials for GCP

Link a Spot account to a GCP Cloud account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object

Set service account for credentials

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Validate Credentials for GCP

Validate the credentials for connecting a Spot account to an GCP Cloud account. The validation will test the credentials without actually set it. Please notice to run the set credentials request to perform the set account credentials.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object

Set service account for credentials

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Set Credentials for Azure

Link a Spot account to an Azure Cloud account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
clientId
string

Set the application ID

clientSecret
string

Set the key secret

subscriptionId
string

Set the subscription ID

tenantId
string

Set the directory ID

Responses

Request samples

Content type
application/json
{
  • "clientId": 111111111,
  • "clientSecret": "32431r2431434132",
  • "tenantId": "1321e1e3123er23",
  • "subscriptionId": "234r3141131"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Validate Credentials for Azure

Validate the credentials for connecting a Spot account to an Azure Cloud account. The validation will test the credentials without actually set it. Please notice to run the set credentials request to perform the set Azure account credentials (https://docs.spot.io/connect-your-cloud-provider/azure-account) .

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
clientId
string

Set the application ID

clientSecret
string

Set the key secret

subscriptionId
string

Set the subscription ID

tenantId
string

Set the directory ID

Responses

Request samples

Content type
application/json
{
  • "clientId": "111111111",
  • "clientSecret": "32431r2431434132",
  • "tenantId": "1321e1e3123er23",
  • "subscriptionId": "234r3141131"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Ocean AWS

Ocean - Serverless containers for Amazon Web Services (AWS)

Create Cluster

Prerequisites

The Ocean Controller is used to monitor the cluster resources and report back to Ocean. The Ocean Controller is required for Ocean Cloud and On-Prem.

To install the Ocean Controller, complete and run the following script on a machine with the kubectl command line tool installed and configured:

#!/usr/bin/env bash
curl -fsSL http://spotinst-public.s3.amazonaws.com/integrations/kubernetes/cluster-controller/scripts/init.sh | \
SPOTINST_TOKEN=<ENTER YOUR TOKEN HERE> \
SPOTINST_ACCOUNT=<ENTER YOUR SPOTINST ACCOUNT ID HERE> \
SPOTINST_CLUSTER_IDENTIFIER=<ENTER YOUR CLUSTER IDENTIFIER HERE> \
bash
Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object

The object specifying the configuration of the Ocean cluster.

Responses

Request samples

Content type
application/json
{
  • "cluster": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Clusters

List the configurations for all Ocean clusters in the specified account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Cluster

Delete an existing Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-abcd1234

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Cluster

Get the configuration of an existing Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-abcd1234

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Cluster

All Ocean parameters are updatable, except for region and identifier. This API supports partial updates, so specific fields can be updated separately.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-1abcd124

The identifier of the Ocean cluster

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

autoApplyTags
string
Default: "false"
Example: autoApplyTags=true

Option to update instance tags on the fly without rolling the cluster.

Request Body schema: application/json
required
object (AWS Cluster)

The object specifying the configuration of the Ocean cluster.

Responses

Request samples

Content type
application/json
{
  • "cluster": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Heartbeat Status

Get the heartbeat status of the Ocean Controller for the cluster.
The response returns the heartbeat status and the last heartbeat timestamp.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-abcd1234

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Fetch Elastilog

Fetch the log of an Ocean cluster.

Authorizations:
path Parameters
clusterIdentifier
required
string
Example: o-6e3819ae

The reporting identifier of the Ocean Controller.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

fromDate
required
string

Beginning date value using either the date format "yyyy-mm-dd; 2016-11-20" or ms "1494751821472".

LIMIT
integer <= 1000
Default: 500
Example: LIMIT=200

Maximum number of lines to extract in a response.

resourceId
string
Example: resourceId=i-12345678

Filter extracted log entries for a specific resource identifier. Default: Null

SEVERITY
string
Default: "ALL"
Enum: "ALL" "INFO" "DEBUG" "WARN"
Example: SEVERITY=INFO

Severity of log entries to extract.

toDate
required
string

End date value using either the date format "yyyy-mm-dd; 2016-11-20" or ms "1494751821472".

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import ASG To Ocean Cluster

Create an Ocean configuration according to an AWS autoscaling group (ASG) configuration.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

autoScalingGroupName
required
string
Example: autoScalingGroupName=myAutoScalingGroup

The ASG name.

region
required
string
Example: region=us-east-1

Region name of the ASG.

Request Body schema: application/json
object

The object specifying the configuration of the VNG.

Responses

Request samples

Content type
application/json
{
  • "launchSpec": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Fetch Right Sizing Recommendations

Get right-sizing recommendations for an Ocean cluster and filter them according to namespace or label.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

namespace
string

For Kubernetes, namespace is an optional query parameter which filters the retrieved resources.

Request Body schema: application/json
object

Optional - may be null.

Responses

Request samples

Content type
application/json
{
  • "filter": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Cluster Costs

Describes Kubernetes cluster costs in a time range based on resource allocation.
The response will provide the distribution of the costs per cluster, namespace, and deployment.
For each entity, the response will contain a breakdown to compute and EBS costs as well.
In addition, the response will show labels or annotations for each namespace or deployment so you can filter costs by labels or annotations.

Authorizations:
path Parameters
clusterIdentifier
required
string
Example: ocean.k8s

The reporting identifier of the Ocean Controller as set in the cluster configuration under the "controllerClusterId" field.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

aggregationPeriod
string

The time segment over which data is calculated and displayed. The period may be "daily" or null. If you use "daily" the costs will be broken into parts, e.g., the cost per each day in the period. Otherwise, there will be only one cost per resource for the whole period.

fromDate
required
string

Beginning date value using either the date format "yyyy-mm-dd; 2016-11-20" or ms "1494751821472".

toDate
required
string

End date value using either the date format "yyyy-mm-dd; 2016-11-20" or ms "1494751821472".

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Upgrade Elastigroup To Ocean

Upgrade an Elastigroup with Kubernetes integration to Ocean for Kubernetes cluster.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

groupId
required
string

Elastigroup identifier

Responses

Response samples

Content type
application/json
{
  • "kind": "spotinst:ocean:aws:k8s",
  • "items": {
    }
}

Initiate Roll

Roll an entire Ocean cluster or roll subsets of the cluster by specifying launchSpecIds or instanceIds. Performing this request will start the roll immediately and run it in defined batches. Note that the first response for a successful request will indicate the start of a roll. In order to check the status of a roll, you can use the GET Roll API.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-abcd1234

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
One of
object

Responses

Request samples

Content type
application/json
Example
{
  • "roll": {
    }
}

Response samples

Content type
application/json
{
  • "id": "scr-5aaf854e",
  • "status": "IN_PROGRESS",
  • "currentBatch": 1,
  • "numOfBatches": 5,
  • "comment": "This is why I deployed my cluster.",
  • "progress": {
    },
  • "oceanId": "o-12e31234",
  • "instanceIds": [
    ],
  • "launchSpecIds": [
    ],
  • "respectPdb": true,
  • "batchMinHealthyPercentage": 100,
  • "createdAt": "2019-03-24T15:46:09.000Z",
  • "updatedAt": "2019-03-24T15:46:09.000Z"
}

List Rolls

Get status for all rolls of an Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-1abcd124

The identifier of the Ocean cluster

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "status": {
    },
  • "kind": "spotinst:ocean:aws:k8s:cluster:roll",
  • "items": [
    ]
}

Update Roll

Update a roll of an Ocean cluster.

Performing the request will stop the next batch in a roll.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-1abcd124

The identifier of the Ocean cluster

ROLL_ID
required
string
Example: scr-12345abc

Ocean cluster roll identifier

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object

Object that specifies the parameters required to initiate a roll (also called a deployment).

Responses

Request samples

Content type
application/json
{
  • "roll": {
    }
}

Response samples

Content type
application/json
{
  • "id": "scr-5aaf854e",
  • "status": "STOPPED",
  • "currentBatch": 1,
  • "numOfBatches": 5,
  • "progress": {
    },
  • "oceanId": "o-12e31234",
  • "respectPdb": true,
  • "batchMinHealthyPercentage": 100,
  • "createdAt": "2019-03-24T15:46:09.000Z",
  • "updatedAt": "2019-03-24T15:46:09.000Z"
}

Get Roll

Get status for a roll of an Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-1abcd124

The identifier of the Ocean cluster

ROLL_ID
required
string
Example: scr-12345abc

Ocean Cluster Roll identifier

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "id": "scr-5aaf854e",
  • "status": "IN_PROGRESS",
  • "currentBatch": 1,
  • "numOfBatches": 5,
  • "comment": "This is why I deployed my cluster.",
  • "progress": {
    },
  • "oceanId": "o-12e31234",
  • "instanceIds": [
    ],
  • "launchSpecIds": [
    ],
  • "respectPdb": true,
  • "batchMinHealthyPercentage": 100,
  • "createdAt": "2019-03-24T15:46:09.000Z",
  • "updatedAt": "2019-03-24T15:46:09.000Z"
}

Get Cluster Nodes

Get nodes data of an Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

instanceId
string
Example: instanceId=i-123

Get a specific node by instance id.

launchSpecId
string
Example: launchSpecId=ols-123abc

Ocean cluster launch specification identifier.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Virtual Node Group

Create a Virtual Node Group.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

initialNodes
integer
Default: null
Example: initialNodes=1

When set to an integer greater than 0, a corresponding number of nodes will be launched from the virtual node group created.

Request Body schema: application/json
required
object (oceanClusterLaunchSpec-2)

AWS Cluster Virtual Node Group (VNG).

Responses

Request samples

Content type
application/json
{
  • "launchSpec": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Virtual Node Groups

List the configurations of all virtual node groups for the cluster.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

oceanId
required
string
Example: oceanId=o-12345abc

Identifier of the Ocean cluster.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Virtual Node Group

Delete a specified launch specification in an Ocean cluster.

Authorizations:
path Parameters
oceanLaunchSpecId
required
string

Ocean cluster launch specification identifier.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

deleteNodes
boolean
Default: false
Example: deleteNodes=true

When set to "true", all instances belonging to the deleted launch specification will be drained, detached, and terminated.

forceDelete
boolean
Default: null
Example: forceDelete=true

When set to "true", delete even if it is the only custom launch spec remaining, and default launch spec has useAsTemlateOnly = true.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Virtual Node Group

Update launch specification.

Authorizations:
path Parameters
oceanLaunchSpecId
required
string

Ocean cluster launch specification identifier.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

autoApplyTags
boolean
Default: false
Example: autoApplyTags=true

Optionally update resource tags on the fly without performing a roll.

Request Body schema: application/json
required
object (oceanClusterLaunchSpec-2)

AWS Cluster Virtual Node Group (VNG).

Responses

Request samples

Content type
application/json
{
  • "launchSpec": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Virtual Node Group

Authorizations:
path Parameters
oceanLaunchSpecId
required
string

Ocean cluster launch specification identifier.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import ASG To Ocean Virtual Node Group

Returns an Ocean Virtual Node Group (VNG) configuration in a given AWS autoscaling group (ASG). The returned value ("Imported VNG") can then be used as input to the Create Virtual Node Group API in order to create an actual VNG in your Ocean cluster.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

autoScalingGroupName
required
string
Example: autoScalingGroupName=myAutoScalingGroup

The ASG name.

oceanId
required
string
Example: oceanId=o-12345abc

Identifier of the Ocean cluster.

Request Body schema: application/json
object

The object specifying the configuration of the VNG.

Responses

Request samples

Content type
application/json
{
  • "launchSpec": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import EKS Cluster Node Group To Ocean Virtual Node Group

  • Returns an Ocean Virtual Node Group (VNG) configuration based on a given AWS EKS Cluster Node Group. The returned value ("Imported VNG") can then be used as input to the Create Virtual Node Group API in order to create an actual VNG in your Ocean cluster.
  • Notes:
    • Make sure to have the necessary permissions in your Spot policy: eks:ListNodegroups, eks:DescribeNodegroup. Click here for the full Spot policy.
    • Exactly one of region or oceanId must be supplied as query parameters.
Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

eksClusterName
required
string
Example: eksClusterName=MyEksCluster

Cluster name of the EKS cluster.

eksNodeGroupName
required
string
Example: eksNodeGroupName=MyEksClusterNodeGroup

Node group name to import.

oceanId
string
Example: oceanId=o-12345abc

Identifier of the Ocean cluster.

region
string
Example: region=us-east-1

Region name of the EKS cluster's node group.

Request Body schema: application/json
object

The object specifying the configuration of the VNG.

Responses

Request samples

Content type
application/json
{
  • "launchSpec": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Launch Nodes in VNG

Launch nodes in Virtual Node Group.

Authorizations:
path Parameters
oceanLaunchSpecId
required
string

Ocean cluster launch specification identifier.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object (Ocean AWS Virtual Node Group Launch Request)

Object specifying the details for the launch request.

Responses

Request samples

Content type
application/json
{
  • "launchRequest": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Ocean ECS

Ocean - Serverless containers for Amazon Elastic Container Service (ECS)

List Clusters

Get the configurations for all Ocean clusters in the specified account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Cluster

Create a new Ocean ECS cluster in the specified account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object (ECS Ocean)

Responses

Request samples

Content type
application/json
{
  • "cluster": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Cluster

Get the configurations for a specified Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Cluster

All Ocean parameters are updatable, excluding Region and ID. This API supports partial updates, so specific fields can be updated separately.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

autoApplyTags
boolean
Default: false
Example: autoApplyTags=true

Optionally update resource tags on the fly without performing a roll.

Request Body schema: application/json
required
object (ECS Ocean)

Responses

Request samples

Content type
application/json
{
  • "cluster": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Cluster

Delete a specified Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import Cluster

Create Ocean cluster object from an existing ECS cluster with at least one container instance to be used as input for create cluster.
This route will not register the ECS cluster to Ocean.

Authorizations:
path Parameters
EcsClusterName
required
string
Example: ecsName

ECS Cluster name

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
name
string

The name for the new Ocean cluster object.
If the name is not provided, the default will be Ocean_{EcsClusterName}

region
required
string

The region that the ECS cluster is running at.

Responses

Request samples

Content type
application/json
{
  • "region": "us-east-1",
  • "name": "oceanName"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Fetch Elastilog

Get the log of an Ocean Cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-abcd1234

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

fromDate
required
string

Beginning date value using either the date format "yyyy-mm-dd; 2016-11-20" or ms "1494751821472".

LIMIT
integer <= 1000
Default: 500
Example: LIMIT=200

Maximum number of lines to extract in a response.

resourceId
string
Example: resourceId=i-12345678

Filter extracted log entries for a specific resource identifier. Default: Null

SEVERITY
string
Default: "ALL"
Enum: "ALL" "INFO" "DEBUG" "WARN"
Example: SEVERITY=INFO

Severity of log entries to extract.

toDate
required
string

End date value using either the date format "yyyy-mm-dd; 2016-11-20" or ms "1494751821472".

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Right Sizing Recommendations

Get right-sizing recommendations for an Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Upgrade Elastigroup to Ocean

Upgrade an Elastigroup with ECS integration into Ocean for ECS cluster.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

groupId
required
string
Example: groupId=sig-1234abcd

The identifier of the Elastigroup to upgrade.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Initiate Roll

Roll an entire Ocean cluster or roll subsets of the cluster by specifying launchSpecIds or instanceIds. Performing this request will start the roll immediately according to defined batches. Note that the first response for a successful request will indicate the start of a roll. In order to check the status of a roll, you can use the GET Roll API using the roll identifier.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
One of
object

Responses

Request samples

Content type
application/json
Example
{
  • "roll": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Rolls

List rolls of an Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Roll

Update a roll of an Ocean cluster. Performing the request will stop the next batch in a roll.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

ROLL_ID
required
string
Example: scr-12345abc

Ocean Cluster Roll identifier

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
status
string
Value: "STOPPED"

Sets the status of the roll.

Responses

Request samples

Content type
application/json
{
  • "status": "STOPPED"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Roll

Get status for roll of an Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

ROLL_ID
required
string
Example: scr-12345abc

Ocean Cluster Roll identifier

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Cluster Container Instances

Get container instances data of an Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

instanceId
string
Example: instanceId=i-123

Get a specific container instance ec2 instance id.

launchSpecId
string
Example: launchSpecId=ols-123abc

Ocean cluster launch specification identifier.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create VNG

Create a new Ocean ECS virtual node group in the specified account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object (oceanClusterLaunchSpec)

AWS Cluster Virtual Node Group (VNG).

Responses

Request samples

Content type
application/json
{
  • "launchSpec": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List VNGs

Get all the custom VNGs for all Ocean clusters in the specified account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get VNG

Get a specific custom launch configuration for an Ocean cluster in the specified account.

Authorizations:
path Parameters
oceanLaunchSpecId
required
string

Ocean cluster launch specification identifier.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete VNG

Delete a specified virtual node group in an Ocean cluster.

Authorizations:
path Parameters
oceanLaunchSpecId
required
string

Ocean cluster launch specification identifier.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

deleteContainerInstances
boolean
Default: false
Example: deleteContainerInstances=true

When set to "true", all instances belonging to the deleted VNG will be drained, detached, and terminated.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update VNG

Get a specific custom launch configuration for an Ocean cluster in the specified account.

Authorizations:
path Parameters
oceanLaunchSpecId
required
string

Ocean cluster launch specification identifier.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

autoApplyTags
boolean
Default: false
Example: autoApplyTags=true

Optionally update resource tags on the fly without performing a roll.

Request Body schema: application/json
required
object (oceanClusterLaunchSpec)

AWS Cluster Virtual Node Group (VNG).

Responses

Request samples

Content type
application/json
{
  • "launchSpec": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import Fargate To Existing Ocean Cluster

Import a Fargate service into an existing Ocean ECS cluster. Upon Fargate service import, Spot clones the selected Fargate services and runs them with the same VPC & Subnet settings on EC2 spot Instances. Ocean will automatically and seamlessly predict and replace spot instances before they are interrupted, ensuring the uptime of the cluster and providing cost-savings of up to 90% over Fargate-enabled ECS clusters.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
services
Array of strings

List of Fargate services by their names. Must contain at least one service.

simpleNewServiceNames
boolean
Default: false

Flag to align imported service names in the following format: sfm_

Responses

Request samples

Content type
application/json
{
  • "services": [
    ],
  • "simpleNewServiceNames": false
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Fargate Services Discovery

Get existing Fargate services in the ECS cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Fargate Migration Status

Get the status of a Fargate service import.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import Fargate To New Ocean Cluster

This API copies the configuration from a Fargate service into the corresponding fields of an Ocean object. (This process is commonly referred to as importing.) The API returns an Ocean object that is suitable for use in the Create API to create a new Ocean cluster based on your Fargate configuration. If you are migrating a Fargate service that has tags, you must run the Opt In procedure on your Amazon account or IAM role. This is required in order to obtain the necessary Amazon Resource Name (ARN) and resource identifier format for your ECS tasks, container instances, and services. For more information about the required ARN and the Opt In procedure, see the following pages:

The API requires one of the following permissions to be defined in Spot -

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
ecsClusterName
required
string

Name of the cluster in ECS.

keyPair
string

Specify a key pair to attach to the services.

oceanClusterName
required
string

Name of the cluster in new Ocean object.

region
required
string

Name of the AWS region the ECS cluster is in.

services
required
Array of Array of strings

Name of the ECS Fargate service to be imported.

Array of objects

Set tags for the service. Items should be unique.

Responses

Request samples

Content type
application/json
{
  • "oceanClusterName": "fargate-import-ocean",
  • "ecsClusterName": "fargateTestCluster",
  • "region": "us-west-1",
  • "services": [
    ],
  • "keyPair": "spot-prod",
  • "tags": [
    ]
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Launch Container Instances In VNG

Launch container instances in virtual node group.

Authorizations:
path Parameters
oceanLaunchSpecId
required
string

Ocean cluster launch specification identifier.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object (Ocean ECS VNG Launch Request)

Responses

Request samples

Content type
application/json
{
  • "launchRequest": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Ocean GKE

Ocean - Serverless containers for Google Kubernetes Engine

Get Heartbeat Status

Get the heartbeat status of the Ocean Controller for the cluster.
The response returns the heartbeat status and the last heartbeat timestamp.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-abcd1234

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Cluster Costs

Describes Kubernetes cluster costs in a time range based on resource allocation.
The response will provide the distribution of the costs per cluster, namespace, and deployment.
For each entity, the response will contain a breakdown to compute and EBS costs as well.
In addition, the response will show labels or annotations for each namespace or deployment so you can filter costs by labels or annotations.

Authorizations:
path Parameters
clusterIdentifier
required
string
Example: ocean.k8s

The reporting identifier of the Ocean Controller as set in the cluster configuration under the "controllerClusterId" field.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

aggregationPeriod
string

The time segment over which data is calculated and displayed. The period may be "daily" or null. If you use "daily" the costs will be broken into parts, e.g., the cost per each day in the period. Otherwise, there will be only one cost per resource for the whole period.

fromDate
required
string

Beginning date value using either the date format "yyyy-mm-dd; 2016-11-20" or ms "1494751821472".

toDate
required
string

End date value using either the date format "yyyy-mm-dd; 2016-11-20" or ms "1494751821472".

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Cluster

Prerequisites:

The Ocean Controller is used to monitor the cluster resources and report back to Ocean.| To install the Ocean Controller, complete and run the following script on a machine with the kubectl command line tool installed and configured:

  #!/usr/bin/env bash
  curl -fsSL http://spotinst-public.s3.amazonaws.com/integrations/kubernetes/cluster-controller/scripts/init.sh | \
  SPOTINST_TOKEN=<ENTER YOUR TOKEN HERE> \
  SPOTINST_ACCOUNT=<ENTER YOUR SPOTINST ACCOUNT ID HERE> \
  SPOTINST_CLUSTER_IDENTIFIER=<ENTER YOUR CLUSTER IDENTIFIER HERE> \
  bash

You may need Kubernetes admin privileges for this script to work. To grant yourself admin privileges, run the following command:

  kubectl create clusterrolebinding <clusterName> --clusterrole=cluster-admin --user=<userEmail>

For more information, refer to our controller installation guides. You can install with Helm, Kubectl or Terraform. For more about Ocean and the Ocean Controller, see the documentation here.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object

The specification of the Ocean cluster.

Responses

Request samples

Content type
application/json
{
  • "cluster": {
    }
}

Response samples

Content type
application/json
{
  • "autoScaler": {
    },
  • "capacity": {
    },
  • "strategy": {
    },
  • "scheduling": {
    },
  • "security": {
    }
}

List Clusters

List the configurations for all Ocean clusters in the specified account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Cluster

Delete a specified Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-abcd1234

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Cluster

Get the configuration for a specified Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-abcd1234

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Cluster

All Ocean parameters are updatable, excluding the Name and controllerClusterId.
This API supports partial updates, so specific fields can be updated separately.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-abcd1234

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object

The specification of the Ocean cluster.

Responses

Request samples

Content type
application/json
{
  • "cluster": {
    }
}

Response samples

Content type
application/json
{
  • "autoScaler": {
    },
  • "capacity": {
    },
  • "strategy": {
    },
  • "scheduling": {
    },
  • "security": {
    },
  • "compute": {
    }
}

Get Elastilog

Get group’s Elastilog by

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-abcd1234

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

fromDate
required
string

Beginning date value using either the date format "yyyy-mm-dd; 2016-11-20" or ms "1494751821472".

LIMIT
integer <= 1000
Default: 500
Example: LIMIT=200

Maximum number of lines to extract in a response.

resourceId
string
Example: resourceId=i-12345678

Filter extracted log entries for a specific resource identifier. Default: Null

SEVERITY
string
Default: "ALL"
Enum: "ALL" "INFO" "DEBUG" "WARN"
Example: SEVERITY=INFO

Severity of log entries to extract.

toDate
required
string

End date value using either the date format "yyyy-mm-dd; 2016-11-20" or ms "1494751821472".

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Right Sizing Recommendations

Get right-sizing recommendations for an Ocean cluster and filter them according to namespace or label.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-abcd1234

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

namespace
string

For Kubernetes, namespace is an optional query parameter which filters the retrieved resources.

Request Body schema: application/json
object

Optional - may be null.

Responses

Request samples

Content type
application/json
{
  • "filter": {
    }
}

Response samples

Content type
application/json
{
  • "response": {
    }
}

Create VNG

Create a virtual node group.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object (oceanClusterLaunchSpec-3)

AWS Cluster Virtual Node Group (VNG).

Responses

Request samples

Content type
application/json
{
  • "launchSpec": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List VNGs

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

oceanId
required
string
Example: oceanId=o-12345abc

Identifier of the Ocean cluster.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete VNG

Delete a specified virtual node group in an Ocean cluster.

Authorizations:
path Parameters
oceanLaunchSpecId
required
string

Ocean cluster launch specification identifier.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

deleteNodes
boolean
Default: false
Example: deleteNodes=true

When set to "true", all instances belonging to the deleted launch specification will be drained, detached, and terminated.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update VNG

All Ocean parameters in a virtual node group are updatable.

Authorizations:
path Parameters
oceanLaunchSpecId
required
string

Ocean cluster launch specification identifier.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object (GKE Cluster)

Responses

Request samples

Content type
application/json
{
  • "launchSpec": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get VNG

Authorizations:
path Parameters
oceanLaunchSpecId
required
string

Ocean cluster launch specification identifier.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Initiate Roll

Roll an entire Ocean cluster or roll subsets of the cluster by specifying launchSpecIds or instanceNames. Performing this request will start the roll immediately, and the roll will take place according to defined batches.

Note that the first response for a successful request will notify about the start of a roll. In order to check the status of a roll, you can use the GET Cluster Roll API using the roll identifier.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-abcd1234

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object

Settings for roll operation

Responses

Request samples

Content type
application/json
{
  • "roll": {
    }
}

Response samples

Content type
application/json
{
  • "rollId": "roll-1234",
  • "oceanId": "o-12e31234",
  • "status": "IN_PROGRESS",
  • "batchNumber": 1,
  • "numOfBatches": 5,
  • "comment": "This is why I deployed my cluster.",
  • "respectPdb": true,
  • "progress": {
    },
  • "instanceNames": [
    ],
  • "launchSpecIds": [
    ],
  • "batchMinHealthyPercentage": 100,
  • "createdAt": "2019-03-24T15:46:09.000Z",
  • "updatedAt": "2019-03-24T15:46:09.000Z"
}

List Rolls

Get status for all rolls of an Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-abcd1234

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "status": {
    },
  • "kind": "spotinst:ocean:aws:k8s:cluster:roll",
  • "items": [
    ]
}

Update Roll

Update a roll of an Ocean cluster.

Performing the request will stop the next batch in a roll.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-abcd1234

Identifier of the Ocean cluster.

ROLL_ID
required
string
Example: scr-12345abc

Ocean Cluster Roll identifier

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
status
string

Set status of the roll. Valid values: "STOPPED"

Responses

Request samples

Content type
application/json
{
  • "status": "STOPPED"
}

Response samples

Content type
application/json
{
  • "rollId": "roll-1234",
  • "status": "STOPPED",
  • "batchNumber": 1,
  • "numOfBatches": 5,
  • "progress": {
    },
  • "batchMinHealthyPercentage": 100,
  • "oceanId": "o-12e31234",
  • "respectPdb": true,
  • "createdAt": "2019-03-24T15:46:09.000Z",
  • "updatedAt": "2019-03-24T15:46:09.000Z"
}

Get Roll

Get status for roll of an Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-abcd1234

Identifier of the Ocean cluster.

ROLL_ID
required
string
Example: scr-12345abc

Ocean Cluster Roll identifier

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "rollId": "roll-1234",
  • "oceanId": "o-12e31234",
  • "status": "IN_PROGRESS",
  • "batchNumber": 1,
  • "numOfBatches": 5,
  • "comment": "This is why I deployed my cluster.",
  • "respectPdb": true,
  • "progress": {
    },
  • "instanceNames": [
    ],
  • "launchSpecIds": [
    ],
  • "batchMinHealthyPercentage": 100,
  • "createdAt": "2019-03-24T15:46:09.000Z",
  • "updatedAt": "2019-03-24T15:46:09.000Z"
}

Get Cluster Nodes

Get nodes data of an Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

instanceName
string
Example: instanceName=sin-123

Get a specific node by instance name.

launchSpecId
string
Example: launchSpecId=ols-123abc

Ocean cluster launch specification identifier.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Upgrade Elastigroup To Ocean

Prerequisites | Perform the following validations prior to upgrade executions: | * Group identifier cannot be null. * Group identifier exists in Elastigroup. * Group should be a GKE Elastigroup with defined scaling policy. * Group identifier is already managed by Ocean.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

groupId
required
string

Elastigroup identifier

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Launch Nodes In VNG

Launch nodes in virtual node group.

Authorizations:
path Parameters
oceanLaunchSpecId
required
string

Ocean cluster launch specification identifier.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object (Ocean GKE Virtual Node Group Launch Request)

Responses

Request samples

Content type
application/json
{
  • "launchRequest": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Ocean AKS

Ocean - Serverless containers for Azure Kubernetes Service

Get Heartbeat Status

Get the heartbeat status of the Ocean Controller for the cluster.
The response returns the heartbeat status and the last heartbeat timestamp.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-abcd1234

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Cluster

Creates an Ocean entity according to a given specification.

Prerequisite:

Kubenet-based AKS clusters only: The permissions needed in the Azure managed service identity (MSI) for Ocean to use when provisioning new nodes should be adjusted. Run the displayed script on a workstation with an Owner permissions token for the Azure environment. Learn more.

Notes:

  1. The Ocean Controller is used to monitor the cluster resources and report back to Ocean SaaS. A properly functioning controller is mandatory for Ocean to operate. To install the Controller, run the following script on a machine with kubectl command line tool installed and configured:
#!/usr/bin/env bash
curl -fsSL http://spotinst-public.s3.amazonaws.com/integrations/kubernetes/cluster-controller/scripts/init.sh | \
SPOTINST_TOKEN=<ENTER YOUR TOKEN HERE> \
SPOTINST_ACCOUNT=<ENTER YOUR SPOTINST ACCOUNT ID HERE> \
SPOTINST_CLUSTER_IDENTIFIER=<ENTER YOUR CLUSTER IDENTIFIER HERE> \
bash
  1. It is recommended to import all necessary information from the existing AKS cluster using the Ocean AKS Cluster Import API call and use its output to create a fully configured Ocean cluster.
Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object (ocean-cluster)

The Ocean cluster.

Responses

Request samples

Content type
application/json
{
  • "cluster": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Clusters

List the configurations for all Ocean clusters in the specified account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Cluster

Get the configurations for a specified Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Cluster

All Ocean parameters are updatable, excluding aks and controllerClusterId.
This API supports partial updates, so specific fields can be updated separately.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object (ocean-cluster)

The Ocean cluster.

Responses

Request samples

Content type
application/json
{
  • "cluster": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Cluster

Delete a specified Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Initiate Roll

Roll an entire Ocean cluster or roll subsets of the cluster by specifying virtualNodeGroupIds or vmNames. Performing this request will start the roll immediately and run it in defined batches. Note that the first response for a successful request will indicate the start of a roll. In order to check the status of a roll, you can use the GET Roll API.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
One of
required
object

Object that specifies the parameters required to initiate a roll (also called a deployment).

Responses

Request samples

Content type
application/json
Example
{
  • "roll": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Rolls

Get status for all rolls of an Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Roll

Update a roll of an Ocean cluster.

Performing the request will stop the next batch in a roll.

Authorizations:
path Parameters
clusterRollId
required
string
Example: acr-12345abc

Ocean cluster roll identifier.

oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object

Object that specifies the roll parameters to update.

Responses

Request samples

Content type
application/json
{
  • "roll": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Roll

Get status for a specific roll of an Ocean cluster.

Authorizations:
path Parameters
clusterRollId
required
string
Example: acr-12345abc

Ocean cluster roll identifier.

oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Cluster Nodes

Get nodes data of an Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

virtualNodeGroupId
string
Example: virtualNodeGroupId=vng-12345abc

Ocean Virtual Node Group identifier.

vmName
string
Example: vmName=vm-123

Get a specific node by vmName.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import Cluster

The Import Cluster API call returns a JSON formatted Ocean cluster specification for a given AKS cluster and import identifier. The returned specification is ready to use in the Ocean AKS Cluster Create API call.

Prerequisites:

  • To initiate the import from AKS, run the following script on a machine with the kubectl command-line tool installed and configured (Ensure the correct context is set in kube config.)
curl -fsSL https://spotinst-public.s3.amazonaws.com/integrations/kubernetes/aks/spot-aks-connector/init.sh | \
bash -s acd-12345678
  • The import identifier has the prefix “acd-“ followed by eight characters. Use the same identifier as input for this API call.
  • Learn more about the Import from AKS process.
Authorizations:
path Parameters
acdIdentifier
required
string
Example: acd-12345abc

During the import from AKS to Ocean, the user executes a script that gets data from the AKS cluster and sends it to the Spot API. The acdIdentifier is the identifier that is associated with this data, and it is used to create an Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object (ocean-cluster-import)

The Ocean cluster import request.

Responses

Request samples

Content type
application/json
{
  • "cluster": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Detach VMs

Scale down specific virtual machines in an Ocean cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
vmsToDetach
required
Array of strings

Array of virtual machine names to detach.

Responses

Request samples

Content type
application/json
{
  • "vmsToDetach": [
    ]
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Virtual Node Group

Create a virtual node group.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object (Ocean AKS Virtual Node Group)

Responses

Request samples

Content type
application/json
{
  • "virtualNodeGroup": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Virtual Node Groups

List the configurations for all virtual node groups in the account or in a specified cluster.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

oceanId
required
string
Example: oceanId=o-12345abc

Identifier of the Ocean cluster.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Virtual Node Group

Get the configuration of a specified virtual node group.

Authorizations:
path Parameters
virtualNodeGroupId
required
string
Example: vng-12345abc

Ocean Virtual Node Group identifier.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Virtual Node Group

All virtual node group parameters are updatable.

Authorizations:
path Parameters
virtualNodeGroupId
required
string
Example: vng-12345abc

Ocean Virtual Node Group identifier.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object (Ocean AKS Virtual Node Group)

Responses

Request samples

Content type
application/json
{
  • "virtualNodeGroup": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Virtual Node Group

Delete a specified virtual node group in an Ocean cluster.

Authorizations:
path Parameters
virtualNodeGroupId
required
string
Example: vng-12345abc

Ocean Virtual Node Group identifier.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Launch VMs

Launch VMs in a Virtual Node Group.

Authorizations:
path Parameters
virtualNodeGroupId
required
string
Example: vng-12345abc

Ocean Virtual Node Group identifier.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object (Ocean AKS Virtual Node Group Launch Request)

Responses

Request samples

Content type
application/json
{
  • "launchRequest": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Fetch Right Sizing Recommendations

Get right-sizing recommendations for an Ocean cluster and filter them according to namespace or label.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-12345abc

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

namespace
string

For Kubernetes, namespace is an optional query parameter which filters the retrieved resources.

Request Body schema: application/json
object

Optional - may be null.

Responses

Request samples

Content type
application/json
{
  • "filter": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Ocean On-Premise

Ocean On-Premise API - Understand cost drivers within your on-premise clusters and compare the costs to the Ocean Cloud.

Ocean On-Premise - Create

Create a new Ocean On-Prem entity.

Prerequisites

The Ocean Controller is used to monitor the cluster resources and report back to Ocean and is required for Ocean On-Prem. To install the Ocean Controller, complete and run the following script on a machine with kubectl command line tool installed and configured:

  #!/usr/bin/env bash
  curl -fsSL http://spotinst-public.s3.amazonaws.com/integrations/kubernetes/cluster-controller/scripts/init.sh | \
  SPOTINST_TOKEN=<ENTER YOUR TOKEN HERE> \
  SPOTINST_ACCOUNT=<ENTER YOUR SPOTINST ACCOUNT ID HERE> \
  SPOTINST_CLUSTER_IDENTIFIER=<ENTER YOUR CLUSTER IDENTIFIER HERE> \
  bash


For more on the Ocean Controller and Ocean's anatomy see the documentation here.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "cluster": {
    }
}

Response samples

Content type
application/json
{
  • "response": {
    }
}

Ocean On-Premise - List

List the configurations for all Ocean cluster in the specified account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "response": {
    }
}

Delete Cluster

Delete an Ocean On-Prem cluster entity in Spot Ocean. This DOES NOT affect your on-prem cluster.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-abcd1234

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Cluster

Get the configurations for the specified Ocean On-Prem cluster entity.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-abcd1234

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "response": {
    }
}

Update Cluster

All Ocean on-prem parameters are updatable. This API supports partial updates, so specific fields can be updated separately.

Authorizations:
path Parameters
oceanClusterId
required
string
Example: o-abcd1234

Identifier of the Ocean cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object (AWS Cluster)
group
object

Responses

Request samples

Content type
application/json
{
  • "cluster": {
    },
  • "group": { }
}

Response samples

Content type
application/json
{
  • "response": {
    }
}

Ocean Insights

Insights allows Spot users on AWS to connect a Kubernetes cluster and within minutes get the cluster analyzed with insights about the current state of infrastructure in the cluster, and the potential effect of migrating the specific cluster into Ocean. Through its powerful features, Ocean presents significant opportunities for infrastructure optimization and automation, which are on display in the Insights console. Connected to Kubernetes clusters and running a continuous analysis, Ocean Insights delivers a holistic picture of your cluster and workloads behavior, from expected cloud costs and resource utilization. Through a simple UI, users will see a breakdown of potential savings when they first connect to Ocean Insights.

Create Cluster

Creates an Ocean Insight entity according to a given specification.

Prerequisite:

The Ocean Controller is used to monitor the cluster resources and report back to Ocean. The Ocean Controller is required for Ocean Insights.

To install the Ocean Controller, complete and run the following script on a machine with the kubectl command line tool installed and configured:

#!/usr/bin/env bash
curl -fsSL http://spotinst-public.s3.amazonaws.com/integrations/kubernetes/cluster-controller/scripts/init.sh | \
SPOTINST_TOKEN=<ENTER YOUR TOKEN HERE> \
SPOTINST_ACCOUNT=<ENTER YOUR SPOTINST ACCOUNT ID HERE> \
SPOTINST_CLUSTER_IDENTIFIER=<ENTER YOUR CLUSTER IDENTIFIER HERE> \
bash
Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object (Ocean Insight)

Responses

Request samples

Content type
application/json
{
  • "cluster": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Clusters

Get the configurations for all Ocean Insights clusters in the specified account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Cluster

Get the configurations for a specified Ocean Insight cluster.

Authorizations:
path Parameters
OCEAN_INSIGHT_ID
required
string
Example: oic-abcd1234

The ID of the Ocean Insight cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Cluster

Delete a specified Ocean Insight cluster.

Authorizations:
path Parameters
OCEAN_INSIGHT_ID
required
string
Example: oic-abcd1234

The ID of the Ocean Insight cluster.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Ocean CD

Ocean CD is a fully managed continuous delivery ('CD') solution for Kubernetes applications. Designed for end-to-end automation and verification of frequent application-deployment processes at scale. Ocean CD architecture and API enable a simple and secured installation that seamlessly fits into any Kubernetes environment. Users get key features like granular visibility, SaaS logic that manage the rollout process, verifications of the applied workloads and automatic rollbacks. To enable Ocean CD, install the controller with one simple command in the Kubernetes cluster and create the following entities using the API:

  • Environment
  • Microservice
  • Notification Provider
  • Rollout Spec

List Ocean CD Clusters

List all Ocean CD clusters.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Ocean CD Cluster

Get an existing Ocean CD cluster.

Authorizations:
path Parameters
clusterId
required
string
Example: cluster-prod

The identifier of the Ocean CD cluster

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Ocean CD Cluster

Update Ocean CD cluster notification settings.

Authorizations:
path Parameters
clusterId
required
string
Example: cluster-prod

The identifier of the Ocean CD cluster

Request Body schema: application/json
object (oceanCDClusterNotification)

Responses

Request samples

Content type
application/json
{
  • "notification": {
    }
}

Delete Ocean CD Cluster

Delete an existing Ocean CD cluster.

Authorizations:
path Parameters
clusterId
required
string
Example: cluster-prod

The identifier of the Ocean CD cluster

Responses

Create Ocean CD Environment

Create Ocean CD Environment.

Authorizations:
Request Body schema: application/json
object (Ocean CD Environemt)

Ocean CD environment.

Responses

Request samples

Content type
application/json
{
  • "environment": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Ocean CD Environments

List all Ocean CD environments.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Ocean CD Environment

Get an existing Ocean CD Environment.

Authorizations:
path Parameters
environmentName
required
string
Example: prod

The identifier name of the Ocean CD Environment

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Ocean CD Environment

Full Update of Ocean CD environment configuration. All non included fields will be nullified

Authorizations:
path Parameters
environmentName
required
string
Example: prod

The identifier name of the Ocean CD Environment

Request Body schema: application/json
object (Ocean CD Environemt)

Ocean CD environment.

Responses

Request samples

Content type
application/json
{
  • "environment": {
    }
}

Patch Ocean CD Environment

Partial update Ocean CD environment configuration.

Authorizations:
path Parameters
environmentName
required
string
Example: prod

The identifier name of the Ocean CD Environment

Request Body schema: application/json
object (Ocean CD Cluster Environemt)

Responses

Request samples

Content type
application/json
{
  • "environment": {
    }
}

Delete Ocean CD Environment

Delete an existing Ocean CD environment.

Authorizations:
path Parameters
environmentName
required
string
Example: prod

The identifier name of the Ocean CD Environment

Responses

Create Ocean CD Microservice

Create Ocean CD microservice.

Authorizations:
Request Body schema: application/json
object (Ocean CD Microservice Entity)

Responses

Request samples

Content type
application/json
{
  • "microservice": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Ocean CD Microservices

List all Ocean CD microservices.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Ocean CD Microservice

Get an existing Ocean CD microservice.

Authorizations:
path Parameters
microserviceName
required
string
Example: inventory-service

The identifier name of the Ocean CD Microservice

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Ocean CD Microservice

Full Update of Ocean CD microservice configuration. All non included fields will be nullified

Authorizations:
path Parameters
microserviceName
required
string
Example: inventory-service

The identifier name of the Ocean CD Microservice

Request Body schema: application/json
object (Ocean CD Microservice Entity)

Responses

Request samples

Content type
application/json
{
  • "microservice": {
    }
}

Patch Ocean CD Microservice

Partial update Ocean CD microservice configuration.

Authorizations:
path Parameters
microserviceName
required
string
Example: inventory-service

The identifier name of the Ocean CD Microservice

Request Body schema: application/json
object (Ocean CD Microservice Entity)

Represents Ocean CD microservice.

Responses

Request samples

Content type
application/json
{
  • "microservice": {
    }
}

Delete Ocean CD Microservice

Delete an existing Ocean CD microservice.

Authorizations:
path Parameters
microserviceName
required
string
Example: inventory-service

The identifier name of the Ocean CD Microservice

Responses

Create Ocean CD Notification Provider

Create Ocean CD notification provider.

Authorizations:
Request Body schema: application/json
object (Ocean CD Notification Provider)

Represents notification provider.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {}
}

List Ocean CD Notification Providers

List all Ocean CD notification providers.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {}
}

Get Ocean CD Notification Provider

Get an existing Ocean CD notification provider.

Authorizations:
path Parameters
notificationProviderName
required
string
Example: rollouts-webhook

The identifier name of the Ocean CD Notification Provider

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {}
}

Update Ocean CD Notification Provider

Full Update of Ocean CD notification provider configuration. All non included fields will be nullified

Authorizations:
path Parameters
notificationProviderName
required
string
Example: rollouts-webhook

The identifier name of the Ocean CD Notification Provider

Request Body schema: application/json
object (Ocean CD Notification Provider)

Represents notification provider.

Responses

Request samples

Content type
application/json
{}

Patch Ocean CD Notification Provider

Partial update Ocean CD notification provider configuration.

Authorizations:
path Parameters
notificationProviderName
required
string
Example: rollouts-webhook

The identifier name of the Ocean CD Notification Provider

Request Body schema: application/json
object (Ocean CD Notification Provider)

Represents notification provider.

Responses

Request samples

Content type
application/json
{}

Delete Ocean CD Notification Provider

Delete an existing Ocean CD notification provider.

Authorizations:
path Parameters
notificationProviderName
required
string
Example: rollouts-webhook

The identifier name of the Ocean CD Notification Provider

Responses

Create Ocean CD Rollout Spec

Create Ocean CD rollout spec.

Authorizations:
Request Body schema: application/json
object (Ocean CD Rollout Spec)

Ocean CD rollout spec entity.

Responses

Request samples

Content type
application/json
{
  • "rolloutSpec": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Ocean CD Rollout Specs

List all Ocean CD rollout specs.

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Ocean CD Rollout Spec

Get the configuration of an existing Ocean CD rollout spec.

Authorizations:
path Parameters
rolloutSpecName
required
string
Example: inventory-prod-rolling

The identifier name of the Ocean CD Rollout Spec

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Ocean CD Rollout Spec

Full Update Ocean CD rollout spec configuration. All non included fields will be nullified

Authorizations:
path Parameters
rolloutSpecName
required
string
Example: inventory-prod-rolling

The identifier name of the Ocean CD Rollout Spec

Request Body schema: application/json
object (Ocean CD Rollout Spec)

Ocean CD rollout spec entity.

Responses

Request samples

Content type
application/json
{
  • "rolloutSpec": {
    }
}

Patch Ocean CD Rollout Spec

Partial update Ocean CD rollout spec configuration.

Authorizations:
path Parameters
rolloutSpecName
required
string
Example: inventory-prod-rolling

The identifier name of the Ocean CD Rollout Spec

Request Body schema: application/json
object (Ocean CD Rollout Spec)

Ocean CD rollout spec entity.

Responses

Request samples

Content type
application/json
{
  • "rolloutSpec": {
    }
}

Delete Ocean CD Rollout Spec

Delete an existing Ocean CD rollout spec.

Authorizations:
path Parameters
rolloutSpecName
required
string
Example: inventory-prod-rolling

The identifier name of the Ocean CD Rollout Spec

Responses

List Ocean CD Rollouts

List Ocean CD rollouts.

Authorizations:
query Parameters
fromDate
required
string
Example: fromDate=2021-10-14

Date to fetch the rollouts from

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Ocean CD Rollout Actions

Execute action on an existing Ocean CD rollout.

Authorizations:
path Parameters
rolloutId
required
string
Example: rol-123456

The identifier of the Ocean CD rollout

Request Body schema: application/json
action
required
string
Value: "rollback"

Responses

Request samples

Content type
application/json
{
  • "action": "rollback"
}

Update Ocean CD Rollout External Verification

Update Ocean CD on-going rollout external verification status.

Authorizations:
path Parameters
rolloutId
required
string
Example: rol-12345

The identifier of the Ocean CD rollout

Request Body schema: application/json
status
required
string
Enum: "failed" "passed"

Responses

Request samples

Content type
application/json
{
  • "status": "failed"
}

Ocean Spark

Ocean for Apache Spark is a managed cloud-native Spark platform that can be deployed in your cloud account.

Running on top of Ocean, Spot’s serverless infrastructure engine for containers, Ocean Spark makes it easy for your data teams to be successful with Apache Spark on Kubernetes, without dealing with the complexity of managing servers.

List Clusters

List the Ocean Spark clusters in the specified account.

Authorizations:
query Parameters
accountId
string
Example: accountId=act-123456789

The ID of the account associated with your token. If omitted the oldest account in the organization will be used.

clusterIdentifier
string (controllerClusterId)
Example: clusterIdentifier=my-ocean-cluster

Optionally filter on the reporting identifier of the Ocean controller in the Ocean cluster (controllerClusterId)

unix (string) or dateTime (string)
Example: fromDate=2020-09-01 or fromDate=1598918400000

Get items on or after this date (ISO 8601 or Unix timestamp)

state
any (oceanSparkClusterState)
Enum: "AVAILABLE" "PROGRESSING" "DEGRADED" "FAILING" "UNKNOWN" "UNREACHABLE" "DELETING"
Example: state=AVAILABLE

Optionally filter on the current state of the Ocean Spark cluster

unix (string) or dateTime (string)
Example: toDate=2020-09-01 or toDate=1598918400000

Get items on or before this date (ISO 8601 or Unix timestamp)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Cluster

Describe an Ocean Spark cluster.

Authorizations:
path Parameters
clusterId
required
string (oceanSparkClusterId)
Example: osc-20fac3f1

A unique identifier for the Ocean Spark cluster

query Parameters
accountId
string
Example: accountId=act-123456789

The ID of the account associated with your token. If omitted the oldest account in the organization will be used.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Cluster

Delete an Ocean Spark cluster.

Removing a cluster will disconnect it from Ocean for Spark. This action is permanent and cannot be undone.

The Ocean for Spark resources will be uninstalled from the cluster, but the Ocean cluster itself (and related Kubernetes resources) will not be deleted.

Authorizations:
path Parameters
clusterId
required
string (oceanSparkClusterId)
Example: osc-20fac3f1

A unique identifier for the Ocean Spark cluster

query Parameters
accountId
string
Example: accountId=act-123456789

The ID of the account associated with your token. If omitted the oldest account in the organization will be used.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Applications

List Spark applications on all Ocean Spark clusters in the specified account. This endpoint is paginated (cursor pagination).

Authorizations:
query Parameters
accountId
string
Example: accountId=act-123456789

The ID of the account associated with your token. If omitted the oldest account in the organization will be used.

after
string (after)
Example: after=MjAyMS0xMS0xOFQwOTo1MjowNS43Mzg4NjArMDA6MDB8NWM3NGY2MDYtZDYxNy00MzcxLWE5ZDktNjc2ZDkxMzRlNWFk

If specified, the page returned in the response contains the items right after this cursor in the ordering

before
string (before)
Example: before=MjAyMS0xMS0xOFQwOTo1MjowNS43Mzg4NjArMDA6MDB8NWM3NGY2MDYtZDYxNy00MzcxLWE5ZDktNjc2ZDkxMzRlNWFk

If specified, the page returned in the response contains the items right before this cursor in the ordering

clusterId
string (oceanSparkClusterId)
Example: clusterId=osc-20fac3f1

Optionally filter on the Ocean Spark cluster ID

jobId
string (schemas) ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a...
Example: jobId=daily-reporting

Optionally filter on the job ID

maxCreatedAt
string <date-time>
Example: maxCreatedAt=2021-11-22

Optionally filter on the creation date

maxUpdatedAt
string <date-time>
Example: maxUpdatedAt=2021-11-22

Optionally filter on the last update date

minCreatedAt
string <date-time>
Example: minCreatedAt=2021-11-22

Optionally filter on the creation date

minUpdatedAt
string <date-time>
Example: minUpdatedAt=2021-11-22

Optionally filter on the last update date

order
string
Default: "DESC"
Enum: "ASC" "DESC"

The direction of the ordering

orderBy
string
Default: "CREATED_AT"
Value: "CREATED_AT"

The field on which to sort

pageSize
integer
Default: 20

The number of applications returned by page

searchTerm
string

Optionally search for a substring of the application ID, application display name, job ID or job display name

state
any (oceanSparkApplicationState)
Enum: "NEW" "SUBMITTED" "RUNNING" "COMPLETED" "FAILED" "SUBMISSION_FAILED" "UNKNOWN"
Example: state=RUNNING

Optionally filter on the state of the Spark application

submissionSource
string (oceanSparkApplicationSubmissionSource)
Enum: "public-api" "jupyter-enterprise-gateway"
Example: submissionSource=public-api

Optionally filter on the submission source of the Spark application

userId
integer (userId)
Example: userId=59438

Optionally filter on the user who created the Spark application

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Applications in Cluster

List the Spark applications in a specific cluster. This endpoint is paginated (cursor pagination).

Authorizations:
path Parameters
clusterId
required
string (oceanSparkClusterId)
Example: osc-20fac3f1

A unique identifier for the Ocean Spark cluster

query Parameters
accountId
string
Example: accountId=act-123456789

The ID of the account associated with your token. If omitted the oldest account in the organization will be used.

after
string (after)
Example: after=MjAyMS0xMS0xOFQwOTo1MjowNS43Mzg4NjArMDA6MDB8NWM3NGY2MDYtZDYxNy00MzcxLWE5ZDktNjc2ZDkxMzRlNWFk

If specified, the page returned in the response contains the items right after this cursor in the ordering

before
string (before)
Example: before=MjAyMS0xMS0xOFQwOTo1MjowNS43Mzg4NjArMDA6MDB8NWM3NGY2MDYtZDYxNy00MzcxLWE5ZDktNjc2ZDkxMzRlNWFk

If specified, the page returned in the response contains the items right before this cursor in the ordering

jobId
string (schemas) ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a...
Example: jobId=daily-reporting

Optionally filter on the job ID

maxCreatedAt
string <date-time>
Example: maxCreatedAt=2021-11-22

Optionally filter on the creation date

maxUpdatedAt
string <date-time>
Example: maxUpdatedAt=2021-11-22

Optionally filter on the last update date

minCreatedAt
string <date-time>
Example: minCreatedAt=2021-11-22

Optionally filter on the creation date

minUpdatedAt
string <date-time>
Example: minUpdatedAt=2021-11-22

Optionally filter on the last update date

order
string
Default: "DESC"
Enum: "ASC" "DESC"

The direction of the ordering

orderBy
string
Default: "CREATED_AT"
Value: "CREATED_AT"

The field on which to sort

pageSize
integer
Default: 20

The number of applications returned by page

searchTerm
string

Optionally search for a substring of the application ID, application display name, job ID or job display name

state
any (oceanSparkApplicationState)
Enum: "NEW" "SUBMITTED" "RUNNING" "COMPLETED" "FAILED" "SUBMISSION_FAILED" "UNKNOWN"
Example: state=RUNNING

Optionally filter on the state of the Spark application

submissionSource
string (oceanSparkApplicationSubmissionSource)
Enum: "public-api" "jupyter-enterprise-gateway"
Example: submissionSource=public-api

Optionally filter on the submission source of the Spark application

userId
integer (userId)
Example: userId=59438

Optionally filter on the user who created the Spark application

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Submit an Application

Submit a Spark application in an Ocean Spark cluster

Authorizations:
path Parameters
clusterId
required
string (oceanSparkClusterId)
Example: osc-20fac3f1

A unique identifier for the Ocean Spark cluster

query Parameters
accountId
string
Example: accountId=act-123456789

The ID of the account associated with your token. If omitted the oldest account in the organization will be used.

Request Body schema: application/json
appId
string (schemas) ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a...

A unique identifier for the Spark application, set by the user or auto-generated from the job ID

object

Configurations for the Spark application supplied in the request. Prefer using a config template for configurations that are stable across runs. Configurations in configOverrides have precedence over those in the config template.

configTemplateId
string (schemas) ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a...

A unique identifier for a configuration template, set by the user.

jobId
required
string^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a...

The ID of the job to which the Spark application belongs. If a job with this ID does not exist yet, it will be created.

Responses

Request samples

Content type
application/json
{
  • "appId": "daily-reporting-2021-08-18",
  • "jobId": "daily-reporting",
  • "configOverrides": {
    },
  • "configTemplateId": "large-app"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Application

Describe a Spark application in an Ocean Spark cluster.

Authorizations:
path Parameters
applicationId
required
string (schemas) ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a...
Example: daily-reporting-2021-08-18

A unique identifier for the Spark application, set by the user or auto-generated from the job ID

clusterId
required
string (oceanSparkClusterId)
Example: osc-20fac3f1

A unique identifier for the Ocean Spark cluster

query Parameters
accountId
string
Example: accountId=act-123456789

The ID of the account associated with your token. If omitted the oldest account in the organization will be used.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Stream Driver log

Stream the driver log of a Spark application in real time.

Authorizations:
path Parameters
applicationId
required
string (schemas) ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a...
Example: daily-reporting-2021-08-18

A unique identifier for the Spark application, set by the user or auto-generated from the job ID

clusterId
required
string (oceanSparkClusterId)
Example: osc-20fac3f1

A unique identifier for the Ocean Spark cluster

query Parameters
accountId
string
Example: accountId=act-123456789

The ID of the account associated with your token. If omitted the oldest account in the organization will be used.

Responses

Stream Kubernetes events

Stream Kubernetes events about the Spark application in real time.

Authorizations:
path Parameters
applicationId
required
string (schemas) ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a...
Example: daily-reporting-2021-08-18

A unique identifier for the Spark application, set by the user or auto-generated from the job ID

clusterId
required
string (oceanSparkClusterId)
Example: osc-20fac3f1

A unique identifier for the Ocean Spark cluster

query Parameters
accountId
string
Example: accountId=act-123456789

The ID of the account associated with your token. If omitted the oldest account in the organization will be used.

Responses

List Config Templates

List config templates across all clusters.

Authorizations:
query Parameters
accountId
string
Example: accountId=act-123456789

The ID of the account associated with your token. If omitted the oldest account in the organization will be used.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Config Templates in Cluster

List the config templates tied to a specific cluster.

Authorizations:
path Parameters
clusterId
required
string (oceanSparkClusterId)
Example: osc-20fac3f1

A unique identifier for the Ocean Spark cluster

query Parameters
accountId
string
Example: accountId=act-123456789

The ID of the account associated with your token. If omitted the oldest account in the organization will be used.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Config Template

Create a new configuration template

Authorizations:
path Parameters
clusterId
required
string (oceanSparkClusterId)
Example: osc-20fac3f1

A unique identifier for the Ocean Spark cluster

query Parameters
accountId
string
Example: accountId=act-123456789

The ID of the account associated with your token. If omitted the oldest account in the organization will be used.

Request Body schema: application/json
required
object

The piece of configuration contained in the config template.

displayName
string (oceanSparkConfigTemplateDisplayName)

A non-unique free-form name for the config template used in the Spot console. Defaults to the config template ID.

id
required
string (schemas) ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a...

A unique identifier for a configuration template, set by the user.

Responses

Request samples

Content type
application/json
{
  • "id": "large-app",
  • "displayName": "Large application",
  • "config": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Config Template

Describe a config template tied to an Ocean Spark cluster.

Authorizations:
path Parameters
clusterId
required
string (oceanSparkClusterId)
Example: osc-20fac3f1

A unique identifier for the Ocean Spark cluster

configTemplateId
required
string (schemas) ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a...
Example: large-app

A unique identifier for a configuration template, set by the user.

query Parameters
accountId
string
Example: accountId=act-123456789

The ID of the account associated with your token. If omitted the oldest account in the organization will be used.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Patch Config Template

Update a config template by merging the existing configuration with the one provided in the request body.

Authorizations:
path Parameters
clusterId
required
string (oceanSparkClusterId)
Example: osc-20fac3f1

A unique identifier for the Ocean Spark cluster

configTemplateId
required
string (schemas) ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a...
Example: large-app

A unique identifier for a configuration template, set by the user.

query Parameters
accountId
string
Example: accountId=act-123456789

The ID of the account associated with your token. If omitted the oldest account in the organization will be used.

Request Body schema: application/json
object

The piece of configuration to merge on top of the existing configuration

displayName
string (oceanSparkConfigTemplateDisplayName)

A non-unique free-form name for the config template used in the Spot console. Defaults to the config template ID.

Responses

Request samples

Content type
application/json
{
  • "displayName": "Large application",
  • "config": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Put Config Template

Update a config template by replacing the existing configuration with the one provided in the request body.

Authorizations:
path Parameters
clusterId
required
string (oceanSparkClusterId)
Example: osc-20fac3f1

A unique identifier for the Ocean Spark cluster

configTemplateId
required
string (schemas) ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a...
Example: large-app

A unique identifier for a configuration template, set by the user.

query Parameters
accountId
string
Example: accountId=act-123456789

The ID of the account associated with your token. If omitted the oldest account in the organization will be used.

Request Body schema: application/json
object

The piece of configuration that will replace the existing configuration

displayName
string (oceanSparkConfigTemplateDisplayName)

A non-unique free-form name for the config template used in the Spot console. Defaults to the config template ID.

Responses

Request samples

Content type
application/json
{
  • "displayName": "Large application",
  • "config": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Config Template

Delete a config template.

Authorizations:
path Parameters
clusterId
required
string (oceanSparkClusterId)
Example: osc-20fac3f1

A unique identifier for the Ocean Spark cluster

configTemplateId
required
string (schemas) ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a...
Example: large-app

A unique identifier for a configuration template, set by the user.

query Parameters
accountId
string
Example: accountId=act-123456789

The ID of the account associated with your token. If omitted the oldest account in the organization will be used.

Responses

List Jobs

List jobs on all Ocean Spark clusters in the specified account.

Authorizations:
query Parameters
accountId
string
Example: accountId=act-123456789

The ID of the account associated with your token. If omitted the oldest account in the organization will be used.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Jobs in Cluster

List the Ocean Spark jobs in a specific cluster.

Authorizations:
path Parameters
clusterId
required
string (oceanSparkClusterId)
Example: osc-20fac3f1

A unique identifier for the Ocean Spark cluster

query Parameters
accountId
string
Example: accountId=act-123456789

The ID of the account associated with your token. If omitted the oldest account in the organization will be used.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Job

Describe an Ocean Spark job in an Ocean Spark cluster.

Authorizations:
path Parameters
clusterId
required
string (oceanSparkClusterId)
Example: osc-20fac3f1

A unique identifier for the Ocean Spark cluster

jobId
required
string (schemas) ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a...
Example: daily-reporting

A unique identifier for an Ocean Spark job.

query Parameters
accountId
string
Example: accountId=act-123456789

The ID of the account associated with your token. If omitted the oldest account in the organization will be used.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Elastigroup AWS

Elastigroup for Amazon Web Services (AWS)

Create Elastigroup

Create a new AWS Elastigroup.

There are several third Party Integrations available, which can be activated based on your configuration, such as:

You can create a beanstalk elastigroup with the following steps:

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object

Elastigroup Configuration

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List All Elastigroups

List all AWS Elastigroups for a Spot Account

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Elastigroup

Describe a specific Elastigroup JSON

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

autoApplyTags
boolean
Default: false
Example: autoApplyTags=true

Optionally update resource tags on the fly without performing a roll.

Request Body schema: application/json
required
object

Group

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Elastigroup

Delete an Elastigroup AWS

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Request Body schema: application/json
object (AMI Dellocation Options)
object (Beanstalk Dellocation Options)
object (Stateful deallocation options)

Responses

Request samples

Content type
application/json
{
  • "statefulDeallocation": {
    },
  • "beanstalk": {
    },
  • "amiBackup": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Elastigroup

Describe a specific Elastigroup JSON

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Stateful Instances

List all stateful instances associated with the Elastigroup

Authorizations:
path Parameters
groupId
required
string

AWS Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Pause Stateful Instance

Pause a stateful instance

Authorizations:
path Parameters
groupId
required
string

AWS Elastigroup ID

statefulInstanceId
required
string

Stateful instance ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Resume Stateful Instance

Resume a stateful instance

Authorizations:
path Parameters
groupId
required
string

AWS Elastigroup ID

statefulInstanceId
required
string

Stateful instance ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Recycle Stateful Instance

Recycle a stateful instance AWS

Authorizations:
path Parameters
groupId
required
string

AWS Elastigroup ID

statefulInstanceId
required
string

Stateful instance ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

De-allocate Stateful Instance

De-allocate a stateful instance – delete all the resources associated with the instance (network interface, snapshots, volumes)

Authorizations:
path Parameters
groupId
required
string

AWS Elastigroup ID

statefulInstanceId
required
string

Stateful instance ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import Stateful Instance

Create a new Stateful Elastigroup – this Elastigroup will have the same configuration and state of the imported instance.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "statefulMigrationGroup": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Stateful Import Status

Get the current status of the import process. Possible values are:

  • MIGRATE_PREPARE_AWS_INSTANCE
  • MIGRATE_CREATE_IMAGE
  • MIGRATE_AWAIT_FOR_IMAGE
  • MIGRATE_AWAIT_USER_ACTION
  • MIGRATE_TERMINATE_INSTANCE
  • MIGRATE_AWAIT_INSTANCE_TERMINATION
  • MIGRATE_UPDATE_GROUP
  • MIGRATE_LAUNCH_INSTANCE
  • MIGRATE_AWAIT_INSTANCE_RUNNING
  • MIGRATE_RESUME_STATEFUL_INSTANCE
  • MIGRATE_AWAIT_STATEFUL_INSTANCE_RUNNING
  • MIGRATE_CANCEL
  • MIGRATE_FINISH
  • MIGRATE_ERROR
Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

statefulMigrationGroupID
required
string
Example: statefulMigrationGroupID=smg-7f041234

The Process ID you want to query

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Stateful Import Status

Cancel the ongoing stateful import

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

statefulMigrationGroupID
required
string
Example: statefulMigrationGroupID=smg-7f041234

The Process ID you want to delete

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Terminate Stateful Instance During Import Process

Manually terminate the source stateful instance during an stateful instance import.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

statefulMigrationGroupID
required
string

The Process ID you want to terminate

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "userAction": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Instance Lock

Set termination protection for specific instance

Authorizations:
path Parameters
instanceId
required
string
Example: i-123456

AWS Instance ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

ttlInMinutes
integer
Example: ttlInMinutes=23

Specify a TTL (in minutes) for this lock, meaning, for how long the protection will be valid for.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Instance Unlock

Remove the termination protection from specific instance

Authorizations:
path Parameters
instanceId
required
string
Example: i-123456

AWS Instance ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Elastigroup Status

Describes the current status of a specific Elastigroup – entailing information regarding running instance and their status

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Activity Events

Get historical data on events that happened in a specific Elastigroup like update, scaling activities, creation of new instances, etc.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123456789

ID of the account associated with your token

fromDate
required
string
Example: fromDate=2016-10-01

Starting date to fetch the events from

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Elastilog

You can fetch a group's (Elastigroup/Ocean/Managed Instance) elastilog via the Spot API, in order to be able to consume elastilog from various tools used for log storing and analyzing. Logs have retention of 3 months back, so minimal fromDate should be up to 3 months back at runtime.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

fromDate
required
string
Example: fromDate=1540036800000

Epoch number that represents the date from which to collect the log (millisecond format)

limit
string
Example: limit=i-12345678

Maximum number of lines to extract in a response. Max value allowed - 1000. Default: 500

resourceId
string
Example: resourceId=i-12345678

Filter extracted log entries for a specific resource id. Default: Null

severity
string
Example: severity=ALL

Severity of log entries to extract. Valid Values: ALL, INFO,DEBUG,WARN. Default: ALL

toDate
required
string
Example: toDate=1542715200000

Epoch number that represents the date until which log is collected (millisecond format)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Capacity

Update the capacity of an Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object (Capacity)

Responses

Request samples

Content type
application/json
{
  • "capacity": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Scale Up

Add instances to your Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

adjustment
integer
Example: adjustment=1

The number of instances to add to the Elastigroup

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Scale Down

Remove instances from your Elastigroup. Note - Scale Advanced expression Remove instances from your Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

adjustment
integer
Example: adjustment=1

The number of instances to add to the Elastigroup

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Suspend Scaling Policies

Suspend processes inside your Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

policyName
required
string
Example: policyName=Example Policy Name

Policy Name of scaling policy to suspend

Request Body schema: application/json
object (Suspension)

Responses

Request samples

Content type
application/json
{
  • "suspension": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Suspend Processes

Suspend processes inside your Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
groupId
Array of strings

groupId

suspensions
Array of objects

Suspensions

Responses

Request samples

Content type
application/json
{
  • "groupId": [
    ],
  • "suspensions": [
    ]
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Suspended Processes

List all active Suspended processes for specific Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Remove Suspended Processes

Remove active suspension from Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123456789

ID of the account associated with your token

Request Body schema: application/json
processes
Array of strings (Processes)

The list of processes to remove from suspension. Valid values are: AUTO_SCALE, AUTO_HEALING, OUT_OF_STRATEGY, PREVENTIVE_REPLACEMENT, REVERT_PREFERRED, SCHEDULING

Responses

Request samples

Content type
application/json
{
  • "processes": [
    ]
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Suspended Scaling Policies

Suspended scaling policies inside your Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Remove Suspended Scaling Policies

Resume suspended scaling policies inside your Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123456789

ID of the account associated with your token

policyName
string
Example: policyName=policy_1

Name of the suspended scaling policy to remove from suspension

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Costs per Elastigroup

Get financial information on a specific Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

aggregationPeriod
string
Example: aggregationPeriod=daily

Optional. The time period over which data is aggregated. Can only be "daily". For example, the figures in each data set are per day

fromDate
required
string
Example: fromDate=2018-06-20

Data values following either a date format (YYYY-MM-DDTHH:mm:ss.SSSZ ; 2016-01-10T00:00:00.000Z) or Unix seconds Timestamp (1494751821)

toDate
required
string
Example: toDate=2018-11-20

Data values following either a date format (YYYY-MM-DDTHH:mm:ss.SSSZ ; 2016-01-10T00:00:00.000Z) or Unix seconds Timestamp (1494751821)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Detailed Cost

Get detailed financial information on a specific Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

fromDate
required
string
Example: fromDate=2018-06-20

Data values following either a date format (YYYY-MM-DDTHH:mm:ss.SSSZ ; 2016-01-10T00:00:00.000Z) or Unix seconds Timestamp (1494751821)

toDate
required
string
Example: toDate=2018-11-20

Data values following either a date format (YYYY-MM-DDTHH:mm:ss.SSSZ ; 2016-01-10T00:00:00.000Z) or Unix seconds Timestamp (1494751821)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Instance Status

Get the current instance status Possible status values - Active and Terminating

Authorizations:
path Parameters
instanceId
required
string
Example: i-123456

The instance ID you want to query

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import EC2 Instance

Import an EC2 instance into a new Elastigroup

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

instanceId
required
string
Example: instanceId=i-008a13360040aa88e

Enter the AWS instance Id of the instance to import

region
required
string
Example: region=us-east-2

The AWS region to create the new Elastigroup in

Request Body schema: application/json
object (Group)

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

AMI Backup

Get status of a specific deployment

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Instance Healthiness

Get a list of instances with health status.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Detach Instance

Detach instances from your Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Request Body schema: application/json
drainingTimeout
integer (Time)

Draining Timeout

instancesToDetach
object (Instances to be detached)

Instances to be detached

shouldDecrementTargetCapacity
boolean (Decrement target capacity criteria)

Should Decrement Target Capacity Criteria

shouldTerminateInstances
boolean (Termination criteria)

Should Terminate Instances Criteria

Responses

Request samples

Content type
application/json
{
  • "instancesToDetach": [
    ],
  • "shouldTerminateInstances": true,
  • "shouldDecrementTargetCapacity": false,
  • "drainingTimeout": 300
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import ASG

Create a new Elastigroup – this Elastigroup will have the same configuration of the imported Autoscaling group

Authorizations:
query Parameters
accountId
string
Example: accountId=act-12345

Your account ID in Spot

autoScalingGroupName
required
string
Example: autoScalingGroupName=MyASG

The ASG name

dryRun
boolean
Example: dryRun=true

When dryRun is set to true, the API call will return the Elastigroup configuration without actually performing any action

region
required
string
Example: region=us-east-1

The AWS region for the ASG

Request Body schema: application/json
object (Group)

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Instance Type By Region

Get the available spot instances types available in a specific region

Authorizations:
query Parameters
region
required
string
Example: region=us-east-2

The AWS region

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Simulate an Instance Interruption

The simulate instance interruption API is used for simulating a spot interruption in AWS, so that customers can verify specific applicative behaviors in case an interruption takes place. Once the interruption api is called, instances posted in the API body will be terminated in AWS, thus mocking a spot interruption.

Authorizations:
query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Request Body schema: application/json
instancesToInterrupt
string

A list of group's instance ids to interrupt

Responses

Request samples

Content type
application/json
{
  • "instancesToInterrupt": [
    ]
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Instance Signal

The instance signal API is used for notifying Spot about the instance state, so Spot can act accordingly. Supported signals are - INSTANCE_READY – Whenever this signal is sent, Spot will register the instance to the ELB INSTANCE_READY_TO_SHUTDOWN – Whenever this signal is sent, Spot will terminate the instance after it was marked for termination. Important - You need to define the expected signals for your Elastigroup in the group configuration.

Authorizations:
query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Request Body schema: application/json
instanceId
string

The instance ID the signal refers to.

signal
string

The specific signal you want to trigger. Valid Values - INSTANCE_READY, INSTANCE_READY_TO_SHUTDOWN

Responses

Request samples

Content type
application/json
{
  • "instanceId": "i-123456",
  • "signal": "INSTANCE_READY"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Instance Standby

Instance Standby enables you to put an instance in Standby state , update or troubleshoot the instance, and then return the instance to service. Instances that are on standby are still part of the Elastigroup, but they don't get application traffic. Whenever instance is standby state - It will be de-registered from all the ELBs / ALBs in the Elastigroup It won't be affected from Scale down activities in the Elastigroup The instance health won't be checked, and it won't be replaced When the instance exits the Standby state - The instance will be register back to all the ELBs / ALBs that are defined in the Elastigroup It will be considered and affected from all the Elastigroup activities (helth checks, scaling, etc.)

Authorizations:
path Parameters
instanceId
required
string
Example: i-123456

The instance ID you want to put in standby state

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Exit Instance Standby

Exit standby by mode

Authorizations:
path Parameters
instanceId
required
string
Example: i-123456

The instance ID you want to put in standby state

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Group's Deployments Status

Get list of all the deployments of a specific Elastigroup and their status

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

limit
integer
Example: limit=5

Limits results

sort
string
Example: sort=createdAt:ASC

Field to sort by the results Default: createdAt:DESC

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Start Deployment

Deploy your Elastigroup (triggers Blue/Green Deployment that replaces the existing instances in the Elastigroup)

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Request Body schema: application/json
batchSizePercentage
required
integer

Indicates (in percentage) the batch size of the deployment (meaning, how many instances to replace in each batch)

drainingTimeout
integer >= 0
Default: 120

Indicates (in seconds) the timeout to drain the instances. Override the group value.

gracePeriod
required
integer

Indicates (in seconds) the timeout to wait until instance become healthy based on the healthCheckType

healthCheckType
string
Enum: "ELB" "ECS_CLUSTER_INSTANCE" "TARGET_GROUP" "OPSWORKS" "NOMAD_NODE" "MULTAI_TARGET_SET" "HCS" "EC2" "NONE"

Define a health check type.
If no value is set the roll will use the group’s auto-healing health check.

object

The roll strategy

Responses

Request samples

Content type
application/json
{
  • "batchSizePercentage": 20,
  • "gracePeriod": 300,
  • "healthCheckType": "EC2",
  • "drainingTimeout": 60,
  • "strategy": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Stop Deployment

Stop an existing deployment

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

rollId
required
string
Example: sbgd-9876

The deployment ID you want to stop

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Request Body schema: application/json
object (Role)

Responses

Request samples

Content type
application/json
{
  • "roll": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Deployment Status

Get status of a specific deployment

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

rollId
required
string
Example: sbgd-9876

The deployment ID you want to query

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Deployment Actions

Apply a Detach action to a deployment

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

rollId
required
string
Example: rollId=sbgd-9876

The deployment ID to call the action on

Request Body schema: application/json
actionType
string (Type of action)

Sets the action that will take place, Accepted values are: DETACH_OLD, DETACH_NEW

drainingTimeout
integer (Draining timeout criteria)

Indicates (in seconds) the timeout to wait until instance are detached

shouldDecrementTargetCapacity
boolean (Should Decrement Target Capacity criteria)
Default: true
shouldHandleAllBatches
boolean (Should Hnadle All Batches Criteria)
Default: false

Indicator if the action should apply to all batches of the deployment or only the latest batch

Responses

Request samples

Content type
application/json
{
  • "actionType": "DETACH_NEW",
  • "shouldHandleAllBatches": true,
  • "drainingTimeout": 200,
  • "shouldDecrementTargetCapacity": true
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

ECS Initiate Cluster Roll

Initiate a cluster roll for an Elastigroup with ECS cluster

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "roll": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

ECS Update Cluster Roll Status

Update a running ECS cluster roll status

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "roll": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

ECS Get All Cluster Rolls Per Elastigroup

Get status for every ECS cluster rolls in given Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

ECS Get Cluster Roll Status by Roll ID

Get status for specific ECS cluster rolls in given Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

ROLL_ID
required
string

The cluster roll ID you want to query

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Start Beanstalk Maintenance

Put your Beanstslk Elastigroup into maintenance mode, before you start updating the beanstalk configuration.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Finish Beanstalk Maintenance

Finish maintenance mode, and trigger a blue-green deployment.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Beanstalk Maintenance Status

Get the group maintenance status.

  • If the status is ACTIVE: putting the group in maintenance mode is allowed.
  • If the status is AWAIT_USER_UPDATE: the group is pending for manually finishing maintenance mode.
  • If the status is CANCELING_MAINTENANCE_MODE: the group is in the process of canceling maintenance mode.
Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Beanstalk Configuration

  • Get your Beanstalk environment configuration from AWS. This call is typically used as the initial step in importing your existing Beanstalk configuration to an Elastigroup.
  • Note: To optimize the availability of your Beanstalk workload on Elastigroup, instance types similar to those running in your existing configuration are automatically added to the response under instanceTypes. Should these instance types not meet your requirements you may remove them.
Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

environmentId
required
string
Example: environmentId=e-12345

The Beanstalk name

region
required
string
Example: region=us-east-1

The AWS region for the Beanstalk

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Beanstalk Reimport

Re-import the beanstalk configuration

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create CodeDeploy B/G Deployment

Trigger a Blue-Green deployment to your Elastigroup, this will initiate a deployment that will replace the existing instances(blue) with new ones(green).

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "deployment": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get CodeDeploy B/G Deployment

Get CodeDeploy Elastigroup deployment status for more information see: CodeDeploy B/G Deployment

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "deployment": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Elastigroup AWS EMR Scaler

List All Scalers

List all MR Scalers and their configuration.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Scaler

Create a new EMR cluster.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "mrScaler": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Scaler Operator

mrScaler – required will have the same configuration as in createMrScaler with one exception: we will only work with strategy of “new”, no “clone”/”warp” will be allowed.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object
name
string

Responses

Request samples

Content type
application/json
{
  • "name": "GuyEmrOperatorTest",
  • "mrScaler": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Scaler

Get a description of a specific MR Scaler and its configuration.

Authorizations:
path Parameters
mrScalerId
required
string
Example: simrs-12223

The MRScaler ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Scaler

Update an MR Scaler. Partial updating is supported.

Authorizations:
path Parameters
mrScalerId
required
string
Example: simrs-12223

The MRScaler ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
One of
object

MR Scaler Object - Update Task Capacity

Responses

Request samples

Content type
application/json
Example
{
  • "mrScaler": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Scaler

Delete an MR Scaler

Authorizations:
path Parameters
mrScalerId
required
string
Example: simrs-12223

The MRScaler ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Instances

Get a list of all instances and instances groups in the cluster

Authorizations:
path Parameters
mrScalerId
required
string
Example: simrs-12223

The MRScaler ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Scale Up

Scale up MR Scaler instances

Authorizations:
path Parameters
mrScalerId
required
string
Example: simrs-12223

The MRScaler ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

adjustment
required
integer
Example: adjustment=3

Number of instances to add to the MR Scaler

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Scale Down

Scale down MR Scaler instances

Authorizations:
path Parameters
mrScalerId
required
string
Example: simrs-12223

The MRScaler ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

adjustment
required
integer
Example: adjustment=3

Number of instances to remove from the MR Scaler

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Scalers

Get MR Scaler cluster

Authorizations:
path Parameters
mrScalerId
required
string
Example: simrs-12223

The MRScaler ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Scaler Costs

Get financial information on the MR Scaler, including running time, costs, and savings

Authorizations:
path Parameters
mrScalerId
required
string
Example: simrs-12223

The MRScaler ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

required
unix (string) or dateTime (string)
Example: fromDate=2020-09-01 or fromDate=1598918400000

Get items on or after this date (ISO 8601 or Unix timestamp)

required
unix (string) or dateTime (string)
Example: toDate=2020-09-01 or toDate=1598918400000

Get items on or before this date (ISO 8601 or Unix timestamp)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Elastigroup GCP

Elastigroup for Google Cloud

List Elastigroups

List all GCP Elastigroups for a Spot Account

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Elastigroup

Create a new GCP Elastigroup

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Elastigroup

List all properties for single GCP Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Elastigroup

Delete an Elastigroup GCP

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Elastigroup

Update an GCP Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object

Elastigroup Configuration

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import GKE Cluster

Import an existing GKE cluster to Elastigroup.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

clusterId
required
string
Example: clusterId=myGKECluster

The GKE Cluster identifier

clusterLocation
required
string
Example: clusterLocation=us-central1-a

The location of the cluster. Enter the desired zone for zonal GKE clusters or the region for regional GKE clusters.

nodePoolName
string
Example: nodePoolName=somePoolName

Set the node pool to import

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Elastigroup Status

Get the status for all instances that are memebers of the Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Activity Events

Get all activity events for the Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

fromDate
required
string <date-time>
Example: fromDate=2019-05-17

Get items on or after this date (ISO 8601)

toDate
required
string <date-time>
Example: toDate=2019-05-25

Get items on or before this date (ISO 8601)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Elastilog

Fetch a group's Elastilog

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

required
unix (string) or dateTime (string)
Example: fromDate=2020-09-01 or fromDate=1598918400000

Get items on or after this date (ISO 8601 or Unix timestamp)

limit
integer <= 1000
Default: 500
Example: limit=200

Maximum number of items to return.

required
unix (string) or dateTime (string)
Example: toDate=2020-09-01 or toDate=1598918400000

Get items on or before this date (ISO 8601 or Unix timestamp)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Scale Up

Add instances to the Elastigroup

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

adjustment
required
integer
Example: adjustment=1

The number of instances to add to the group

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Scale Down

Remove instances from the Elastigroup

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

adjustment
required
integer
Example: adjustment=1

The number of instances to remove from the group

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Elastigroup Costs

Get financial information on a specific Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

required
unix (string) or dateTime (string)
Example: fromDate=2020-09-01 or fromDate=1598918400000

Get items on or after this date (ISO 8601 or Unix timestamp)

required
unix (string) or dateTime (string)
Example: toDate=2020-09-01 or toDate=1598918400000

Get items on or before this date (ISO 8601 or Unix timestamp)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Deployments

Get all of the deployments for a specific Elastigroup, and their status

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
batchSizePercentage
required
integer

(in percentage) the batch size of the deployment, i.e.: how many instances to replace in each batch

gracePeriod
required
integer

(in seconds) the time until an instance becomes healthy in the load balancer

Responses

Request samples

Content type
application/json
{
  • "batchSizePercentage": 20,
  • "gracePeriod": 300
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Start Deployment

Deploy the Elastigroup: Triggers a Blue/Green deployment that replaces the existing instances in the Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
batchSizePercentage
required
integer

(in percentage) the batch size of the deployment, i.e.: how many instances to replace in each batch

gracePeriod
required
integer

(in seconds) the time until an instance becomes healthy in the load balancer

Responses

Request samples

Content type
application/json
{
  • "batchSizePercentage": 20,
  • "gracePeriod": 300
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Deployment

Get a specific deployment's status

Authorizations:
path Parameters
rollId
required
string

The deployment ID to query

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Stop Deployment

Stop an existing deployment

Authorizations:
path Parameters
rollId
required
string

The deployment ID to query

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "roll": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Detach Instances

Detach instances from an Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
drainingTimeout
integer

(Applies only if shouldTerminateInstances is on) The draining timeout (in seconds) before terminating the instance. If no draining timeout is defined, the group's draining timeout applies.

instancesToDetach
array

The names of the instances to detach from the group.

shouldDecrementTargetCapacity
boolean

Indicates whether to decrement the capacity of the group, so no new instance will be launched instead of the detached one.

shouldTerminateInstances
boolean

Indicates whether to terminate the instances or not.

Responses

Request samples

Content type
application/json
{
  • "instancesToDetach": [
    ],
  • "shouldTerminateInstances": true,
  • "shouldDecrementTargetCapacity": true,
  • "drainingTimeout": 0
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Instance Status

Get the current instance status. Possible status values: ACTIVE, TERMINATING

Authorizations:
path Parameters
instanceId
required
string

GCP Instance ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Lock Instance

Set termination protection for a specific instance.

Authorizations:
path Parameters
instanceId
required
string

GCP Instance ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

ttlInMinutes
required
string

Specify a TTL (in minutes) for this lock, i.e.: for how long the protection will be valid for.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Unlock Instance

Remove termination protection for a specific instance.

Authorizations:
path Parameters
instanceId
required
string

GCP Instance ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Elastigroup Azure Spot VMs

Elastigroup for Microsoft Azure

Update Elastigroup

Update an Azure Elastigroup cluster.

Authorizations:
path Parameters
groupId
required
string
Example: sig-123123

Elastigroup's ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Elastigroup

List an Elastigroup cluster.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Elastigroup

Delete an Elastigroup cluster.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Capacity

Update the capacity of an Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object (Capacity)

Capacity of Elastigroup.

Responses

Request samples

Content type
application/json
{
  • "capacity": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Elastigroup

Create a new Elastigroup cluster.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object (Azure Elastigroup)

Azure Elastigroup Configuration

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Elastigroups

List Elastigroup clusters.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

NAME
string
Example: NAME=name

Filters to find the Elastigroup via a specific name.

REGION
string
Example: REGION=region

Filters to find all the groups in a specific region.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Elastigroup Status

Get status of Elastigroup cluster.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Vm Healthiness

Get a list of vms with health status.

Authorizations:
path Parameters
groupId
required
string
Example: sig-123123

Elastigroup's ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Suspend Group

Suspends the Group.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
Array of objects

List of processes to create or update their suspensions

Responses

Request samples

Content type
application/json
{
  • "processes": [
    ]
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Resume Group

Resumes the Group.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
Array of objects

List of processes to cancel their suspensions

Responses

Request samples

Content type
application/json
{
  • "processes": [
    ]
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Detach VMs

Scale down specific virtual machines in Elastigroup cluster.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
drainingTimeout
string
Default: 300

The time in seconds to allow the virtual machine be be drained from incoming TCP connections and detached from MLB before terminating it.

shouldDecrementTargetCapacity
required
Boolean

Prevent Elastigroup from scaling back to target capacity when virtual machines are detached.

shouldTerminateVms
required
Boolean

Whether to terminate the VMs or not.

vmsToDetach
required
Array of strings

Array of virtual machine names to detach.

Responses

Request samples

Content type
application/json
{
  • "vmsToDetach": [
    ],
  • "shouldTerminateVms": true,
  • "shouldDecrementTargetCapacity": true,
  • "drainingTimeout": 300
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Scale Down

Scale down virtual machines in Elastigroup cluster.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

adjustment
required
integer
Example: adjustment=5

Number of VMs to scale down

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Scale Up

Scale up virtual machines in Elastigroup cluster.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

adjustment
required
integer
Example: adjustment=5

Number of VMs to scale up

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Start Deployment

Deploy the Elastigroup. This triggers a Blue/Green deployment that replaces the existing VMs in the Elastigroup.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object (groupVmDeployment)

Responses

Request samples

Content type
application/json
{
  • "deployment": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get All Deployments

Get a list of all the deployments of a specific Elastigroup and the status of each one.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

LIMIT
integer
Example: LIMIT=14

Limits the number of deployments returned. Default: 5

SORT
string
Example: SORT=createdAt:DESC

Field by which to sort the results. Default: createdAt:DESC

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Deployment

Get the status of a specific deployment.

Authorizations:
path Parameters
DEPLOYMENT_ID
required
string
Example: sbgd-9876

The deployment ID you want to query.

groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Deployment Status

Get the detailed status of a specific deployment. This includes status details per batch and other information.

Authorizations:
path Parameters
DEPLOYMENT_ID
required
string
Example: sbgd-9876

The deployment ID you want to query.

groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import Group From Scale Set

Given a scale set, constructs a valid group configuration based on the scale set and returns it.

Authorizations:
path Parameters
resourceGroupName
required
string
Example: ExampleResourceGroup

Resource Group Name - Must be valid.

scaleSetName
required
string
Example: MyExampleScaleSetImport

Scale Set Name - Must be valid

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import Group From Virtual Machine

Given a virtual machine, constructs a valid group configuration based on the virtual machine and returns it.

Authorizations:
path Parameters
resourceGroupName
string
Example: ExampleResourceGroup
virtualMachineName
string
Example: MyExampleVirtualMachineImport
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create VM Signal

The VM signal API is used for notifying Spot about the VM state so that Spot can act accordingly. Supported signals are vmReady – Whenever this signal is sent, Spot will register the instance to the relevant Load Balancer and Application Gateway. vmReadyToShutdown – When this signal is received after a vm is detached; we will immediately terminate the vm. You must define the expected signals for your Elastigroup in the group configuration.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
signalType
required
String
Enum: "vmReady" "vmReadyToShutdown"

The specific signal you want to trigger.

vmName
required
string

The virtual machine ID the signal refers to.

Responses

Request samples

Content type
application/json
{
  • "vmName": "vm-123456",
  • "signalType": "vmReady"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Virtual Machine Protection

Protect virtual machines in Elastigroup cluster.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

vmName
required
string
Example: i-f2a44ba41875

The virtual machine name to protect.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

ttlInMinutes
integer
Example: ttlInMinutes=180

Specify a TTL (in minutes) for this protection, meaning, for how long the protection will be valid for. (If null, infinite protection)

Responses

Response samples

Content type
application/json
{
  • "response": {
    }
}

Virtual Machine Remove Protection

Un-Protect virtual machines in Elastigroup cluster.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

vmName
required
string
Example: i-f2a44ba41875

The virtual machine name to remove protection.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "response": {
    }
}

Get Elastilog

You can fetch a Elastigroup's Elastilog via the Spot API, in order to be able to consume elastilog from various tools used for log storing and analyzing. Logs have retention of 3 months back from today, so minimal fromDate should be up to 3 months back at runtime.

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Spot Elastigroup ID you want to update

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

required
unix (string) or dateTime (string)
Example: fromDate=2020-09-01 or fromDate=1598918400000

Get items on or after this date (ISO 8601 or Unix timestamp)

limit
integer [ 0 .. 1000 ]
Example: limit=500

Maximum number of lines to extract in a response. Max value allowed - 1000. Default is 500, if got null.

RESOURCE_ID
string
Example: RESOURCE_ID=vm-12345678

Filter log extracted entires related to a specific resource id Default: Null

SEVERITY
string
Enum: "DEBUG" "WARN" "INFO" "ALL" "ERROR"
Example: SEVERITY=WARN

Severity of log entries to extract.

required
unix (string) or dateTime (string)
Example: toDate=2020-09-01 or toDate=1598918400000

Get items on or before this date (ISO 8601 or Unix timestamp)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Elastigroup Azure Scale Set VMs

Elastigroup for Microsoft Azure Scale Set

List Elastigroups

List all Azure Elastigroups for a Spot Account

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Elastigroup

Create a new Azure Elastigroup

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object (Azure Elastigroup)

Azure Elastigroup Configuration

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Elastigroup

Delete an Elastigroup Azure

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Elastigroup

List all properties for single Azure Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Elastigroup

Update an Azure Elastigroup

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Elastigroup Status

Get the status for all instances that are memebers of the Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Detach Instances

Detach one or more instances from an Azure Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
drainingTimeout
integer
instancesToDetach
Array of strings
shouldDecrementTargetCapacity
boolean

Responses

Request samples

Content type
application/json
{
  • "instancesToDetach": [
    ],
  • "shouldDecrementTargetCapacity": true,
  • "drainingTimeout": 300
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Deployments

Historical list of all deployments for an Azure Elastigroup

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
string
Example: accountId=act-123abc

Your Spotinst accountid associated with your token

limit
integer
Example: limit=5

Limits results

sort
integer
Example: sort=created:ASC

Field to sort by the results

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Start Deployment

Start a new Azure Elastigroup deployment

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
batchSizePercentage
integer (Batch Size Percentage)

Indicates (in percentage) the batch size of the roll (meaning, how many nodes to replace in each batch)

gracePeriod
integer (Grace Period)

Indicates (in seconds) the timeout to wait until node become healthy in the ELB

healthCheckType
string (Health Check Type)

Define a health check type. valid values: mlb, node_state, none (wait the entire grace period for each batch). If no value is set the roll will use the group’s auto-healing health check.

Responses

Request samples

Content type
application/json
{
  • "batchSizePercentage": 50,
  • "gracePeriod": 300,
  • "healthCheckType": "INSTANCE_STATE"
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Roll Status

Get status of a specific roll

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

The Elasticgroup id you want to roll

rollId
required
string
Example: sbgd-9876

The roll id you want to query

query Parameters
accountId
string
Example: accountId=act-123abc

Your Spotinst accountid associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Task

Update an Elastigroup Azure

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Deployment

Describe a single deployment for an Azure Elastigroup

Authorizations:
path Parameters
deploymentId
required
string
Example: sbgd-9876

Azure Elastigroup ID

groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Stop Deployment

Stop a deployment

Authorizations:
path Parameters
deploymentId
required
string
Example: sbgd-9876

Azure Elastigroup ID

groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "roll": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Tasks

List all Azure Tasks for a Spot Account

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Task

Create a new Azure Task

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Task

Delete an Elastigroup Azure

Authorizations:
path Parameters
groupId
required
string
Example: sig-12345

Elastigroup ID

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Task

Update an Elastigroup Azure

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "group": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Costs Per Account

Get costs per time filter.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

required
unix (string) or dateTime (string)
Example: fromDate=2020-09-01 or fromDate=1598918400000

Get items on or after this date (ISO 8601 or Unix timestamp)

required
unix (string) or dateTime (string)
Example: toDate=2020-09-01 or toDate=1598918400000

Get items on or before this date (ISO 8601 or Unix timestamp)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Managed Instance AWS

Managed Instance is a Spot solution for launching and managing a single compute instance. On the AWS cloud, for a standard single instance workload, an On-Demand EC2 instance is launched. The instance is expected to be highly available, easily manageable, and integrate well with additional services and monitoring tools. For more information please review the concepts section.

Create Managed Instance

Create a new Managed Instance resource.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "managedInstance": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Managed Instances

List all Managed Instance resources in the account.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Managed Instance

  • Update one or more attributes in your Managed Instance.
  • This API supports partial updates, so only specific fields can be updated separately.
  • In order to remove a setting from the instance config, set the object value to null.
  • For a Full List of the Elastigroup JSON object reference please see Managed Instance Create.
Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

MI_ID
required
string
Example: MI_ID=smi-111

Managed Instance ID you want to get

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "managedInstance": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Managed Instance

Get specific Managed Instance config.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

MI_ID
required
string
Example: MI_ID=smi-111

Managed Instance ID you want to get

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Managed Instance

Get specific Managed Instance config.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

MI_ID
required
string
Example: MI_ID=smi-111

Managed Instance ID you want to get

Request Body schema: application/json
object
object

Responses

Request samples

Content type
application/json
{
  • "deallocationConfig": {
    },
  • "amiBackup": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Pause Managed Instance

Pause an existing Managed Instance.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

MI_ID
required
string
Example: MI_ID=smi-111

Managed Instance ID you want to get

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Resume Managed Instance

Resume an existing Managed Instance.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

MI_ID
required
string
Example: MI_ID=smi-111

Managed Instance ID you want to get

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Recycle Managed Instance

Recycle an existing Managed Instance.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

MI_ID
required
string
Example: MI_ID=smi-111

Managed Instance ID you want to get

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Managed Instance Costs

Get financial information on a specific managed instance. To use this API, managedInstanceId must be defined.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

aggregationPeriod
string

Data values following either a date format (YYYY-MM-DDTHH:mm:ss.SSSZ ; 2016-01-10T00:00:00.000Z) or Unix seconds Timestamp (1494751821)

fromDate
required
string <date-time>
Example: fromDate=2019-05-17

Get items on or after this date (ISO 8601)

MI_ID
required
string
Example: MI_ID=smi-111

Managed Instance ID you want to get

toDate
required
string <date-time>
Example: toDate=2019-05-25

Get items on or before this date (ISO 8601)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Managed Instance Status

Describes the current status of a specific Managed Instance – entailing information regarding running instance and its status.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

MI_ID
required
string
Example: MI_ID=smi-111

Managed Instance ID you want to get

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Import Instance from AWS

  • Import an instance from AWS into Managed Instance, while keeping the instance data and its persistence settings.
  • This call is starting the migration and returns migration ID.
  • In order to get migration status use the Get Migration Status call
Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object (Migration)

Migration Configuration

Responses

Request samples

Content type
application/json
{
  • "migration": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Instance Migration Status

  • Get a previously initiated instance migration status.
  • To initiate an instance migration from AWS use the Import Instance From AWS call.
  • On initiation, the migration would be in the following state: `MIGRATE_START`.
  • Possible end states for the migration are: `MIGRATE_CANCEL`, `MIGRATE_FINISH`, `MIGRATE_ERROR`.
Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

MI_ID
required
string
Example: MI_ID=smi-111

Managed Instance ID you want to get

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Audit Log Events

Gets audit events that have response status of 200. This is the default when the responseStatus parameter is not included in the query. When you use responseStatus in the query, you can get all audit events without regard to status.

The API requires one of the following permissions to be defined in Spot:

  • Permission: Organization Viewer (See User Roles) or
  • Action: setup:describeAllAuditEvents (See Access Policies)
Authorizations:
query Parameters
accountId
any
Example: accountId=act-123abc

ID of the account associated with your token

fromDate
required
unix <string>
Example: fromDate=1598918400000

Get items on or after this date (Unix timestamp)

responseStatus
any
Example: responseStatus=all

Determines whether the audit events should be filtered by their response status code or not. Valid values: "success": Gets only events with status 200. "all": Audit events will not be filtered by response status codes, and all the events will be returned. Default: success

toDate
required
unix <string>
Example: toDate=1598918400000

Get items on or before this date (Unix timestamp)

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Create Health Check

Create an HCS for Spot Elastigroup.

Authorizations:
query Parameters
ACCOUNT_ID
any
Example: ACCOUNT_ID=act-123abc

ID of the account associated with your token

Request Body schema: application/json
required
object

Group

Responses

Request samples

Content type
application/json
{
  • "healthCheck": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Health Checks

Get a list of all HCS services.

Authorizations:
query Parameters
accountId
any
Example: accountId=act-123abc

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Health Check

Update existing HCS.

Authorizations:
query Parameters
ACCOUNT_ID
any
Example: ACCOUNT_ID=act-123abc

ID of the account associated with your token

HEALTHCHECK_ID
required
any
Example: HEALTHCHECK_ID=hcs-123

The HCS you want to update

Request Body schema: application/json
required
object

Group

Responses

Request samples

Content type
application/json
{
  • "healthCheck": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Health Check

List the information of a particular HCS

Authorizations:
query Parameters
ACCOUNT_ID
any
Example: ACCOUNT_ID=act-123abc

ID of the account associated with your token

HEALTHCHECK_ID
required
any
Example: HEALTHCHECK_ID=hcs-123

The HCS you want to update

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Health Check

Delete existing HCS

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

HEALTHCHECK_ID
required
any
Example: HEALTHCHECK_ID=hcs-123

The HCS you want to update

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Notifications Service

A Spot Notifications service enables you a fast, flexible, fully managed push notification service that lets you know about major events that happened in your Spot account.ֿ Spot Notifications makes it simple and cost-effective to get push notifications to your email address, HTTP, HTTPS or AWS SNS (Simple Notifications Service).

Update Account Notification Policy

Update the account notification policy

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "accountPolicy": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Account Notification Policy

Get the account notification policy

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Subscribe

Create a notification for your resources

Authorizations:
query Parameters
ACCOUNT_ID
any
Example: ACCOUNT_ID=act-123abc

ID of the account associated with your token

Request Body schema: application/json
required
object

Group

Responses

Request samples

Content type
application/json
{
  • "subscription": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Subscriptions

List all subscriptions and their information

Authorizations:
query Parameters
ACCOUNT_ID
any
Example: ACCOUNT_ID=act-123abc

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Unsubscribe

Delete an existing page

Authorizations:
path Parameters
SUBSCRIPTION_ID
required
any
Example: hcs-123

The subscription you want to update

query Parameters
accountId
any
Example: accountId=act-123abc

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Subscription

Get a specific notification and its information

Authorizations:
path Parameters
SUBSCRIPTION_ID
required
any
Example: hcs-123

The subscription you want to update

query Parameters
accountId
any
Example: accountId=act-123abc

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Subscription

Update existing notification

Authorizations:
path Parameters
SUBSCRIPTION_ID
required
any
Example: hcs-123

The subscription you want to update

query Parameters
accountId
any
Example: accountId=act-123abc

ID of the account associated with your token

Request Body schema: application/json
required
object

Element that store all the subscription config

Responses

Request samples

Content type
application/json
{
  • "subscription": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Insights Service

Potential Savings

Describe Potential Savings for AWS resources like - ASG (Auto-scaling groups), Beanstalk, ELB, ECS, EMR and tagged instances. The response will provide Potential monthly savings in USD

Authorizations:
query Parameters
accountId
string
Example: accountId=act-123456789

ID of the account associated with your token

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Instances Potential Savings

Describe potential savings for the listed instances. You can provide multiple instance IDs separated by a comma. The response will provide potential monthly savings in USD.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

instanceIds
required
string
Example: instanceIds=i-1234567

The instance ID

region
required
string
Example: region=us-east-1

The AWS Region

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Costs per Account

Retrieve costs per specified account over a specified time period. Example of URL with with daily aggregation period over a time period of 30 days - https://api.spotinst.io/aws/ec2/account/costs?fromDate=1585699200000&toDate=1588291199000&aggregationPeriod=daily

Authorizations:
query Parameters
accountId
string
Example: accountId=act-123456789

ID of the account associated with your token

aggregationPeriod
string
Example: aggregationPeriod=daily

Optional. The time period over which data is aggregated. Can only be "daily". For example, the figures in each data set are per day

fromDate
string
Example: fromDate=2018-06-20

Date can be either in ISO-8601 date format (yyyy-mm-dd) or in Unix Timestamp format (e.g. 1494751821472).

toDate
string
Example: toDate=2018-11-20

Date can be either in ISO-8601 date format (yyyy-mm-dd) or in Unix Timestamp format (e.g. 1494751821472).

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Suggested Instance Type

Get suggested instance types by required resources. Note that request must include region, and at least one of the following values - baselineInstanceType, requiredVCpu, requiredMemoryGib

Authorizations:
query Parameters
accountId
string
Example: accountId=act-123abc

ID of the account associated with your token

Request Body schema: application/json
object (AWS Elastigroup)

Responses

Request samples

Content type
application/json
{
  • "requirements": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Organization Instances Costs

Get a summary of your instances costs by given time filter.

The request will result in CSV format on your instances from all given accounts.

Notice that the date range can be up to 180 days.

Response fields are detailed in the response

Authorizations:
Request Body schema: application/json
accountIds
Array of strings
fromDate
string
toDate
string

Responses

Request samples

Content type
application/json
{
  • "accountIds": [
    ],
  • "fromDate": 1569950296,
  • "toDate": 1570727896
}

Response samples

Content type
application/csv
id,accountId,accountName,resourceId,cloudProvider,instanceId,instanceType,region,useCase,lifeCycle,product,launchTime,terminationTime,runningHours,odHourlyPrice,odCost,actualCost,savings,reservationId 2439,act-abc12345,Demo,oesg-cc4740e1,AWS,i-00d67d5efc69e938d,r4.large,us-west-2,K8S,EXCESS,LINUX,2019-10-05T02:59:40.000Z,2019-10-05T03:15:12.000Z,1,0.133,0.133,0.0337,0.0993, 2576,act-abc12345,Demo,oesg-5feb10ab,AWS,i-01086811aefdc4959,c4.large,us-west-2,K8S,EXCESS,LINUX,2019-10-06T10:13:03.000Z,2019-10-06T19:07:05.000Z,9,0.1,0.9,0.279,0.621, 1760,act-abc12345,Demo,oesg-cc4740e1,AWS,i-01797b0ac578198fa,c3.large,us-west-2,K8S,EXCESS,LINUX,2019-08-27T06:41:14.000Z,2019-10-05T02:57:30.000Z,23.9997,0.105,2.52,0.7008,1.8192, 1761,act-abc12345,Demo,oesg-cc4740e1,AWS,i-02e460584769b3c28,r4.large,us-west-2,K8S,EXCESS,LINUX,2019-08-20T22:23:54.000Z,,23.9997,0.133,3.192,0.8088,2.3832,

Create Data Integration

Create a new data integration, an object representing a connection to a third-party vendor to export to and import data from.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "dataIntegration": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

List Data Integration

List data integrations.

Authorizations:
query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

health
string
Enum: "valid" "invalid" "forbidden"
Example: health=valid

The health status of the data integrations to list.

name
string
Example: name=my-data-integration

The name of the data integrations to list.

status
string
Enum: "enabled" "disabled"
Example: status=enabled

The status of the data integrations to list.

vendor
string
Value: "s3"
Example: vendor=s3

The vendor of the data integrations to list.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Update Data Integration

Update an existing data integration.

Authorizations:
path Parameters
dataIntegrationId
required
string
Example: di-123abc

Identifier of the data integration.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "dataIntegration": {
    }
}

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Get Data Integration

Get an existing data integration.

Authorizations:
path Parameters
dataIntegrationId
required
string
Example: di-123abc

Identifier of the data integration.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}

Delete Data Integration

Delete an existing data integration.

Authorizations:
path Parameters
dataIntegrationId
required
string
Example: di-123abc

Identifier of the data integration.

query Parameters
accountId
required
string
Example: accountId=act-123456789

The ID of the account associated with your token.

Responses

Response samples

Content type
application/json
{
  • "request": {
    },
  • "response": {
    }
}